just the e part Consider the following schema, representing a portion of a publi
ID: 3862677 • Letter: J
Question
just the e part
Consider the following schema, representing a portion of a publishing system: Articles(ID:integer, title:string, journal:string, issue:integer, year:integer, startpage:integer, endpage:integer) Authors(ID:integer, name:string) AuthoredPapers(articlelD:integer, authorlD:integer) Consider creating the three tables in MySQL and populating them with data to test your queries on. Be careful to create useful data that isn't misleading. (a) Find for each article, its ID, title and the number of authors who wrote it. (b) Find the titles of all the articles for which 'John von Neumann's is an author. (c) Find the number of co-authors of 'Carl Gauss'. (d) Find the title for the longest article(s) (i.e., those with the most number of total pages). (e) Indicate whether each of the following queries is valid or not (i.e., SQL gives ail error message). For those that are not valid indicate why, otherwise provide an simple English translation of the query. SELECT * FROM Articles WHERE endpage-startpage>25 SELECT * FROM Articles WHERE endpage-startpage22 GROUP BY yearExplanation / Answer
1)it will give those rows where endpage of article-start page of article is greater than 25;
2)not valid ,because endpage will always geater than start page hence condition endpage-startpage would not be <0;
3)not valid because journal is not integer type;
4)it will give average of year where title start with with algorithm;
like (algorithmstructures);
5)count the no of rows of each year;
6)not valid because of invalid group function
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.