Task 1 (7 marks)Construct an ER diagram in Workbench (starting with the incomplete sampleprovided) for the SBH database. You may need to introduce additional entities andrelationships to capture the data requirements of SBH. You must include attributes,their appropriate data types and define identifiers for each entity in the process. Youwill also need to implement appropriate referential integrity constraints. Place thediagram into a file called A1__< lastname="">.doc. Please makesure that your diagram is clearly readable.Identify any constraints that cannot be modelled in the ER diagram.Task 2 (3 marks)Identify all functional dependencies for each relation of the SBH database. Thenstate which normal form (1NF, 2NF, 3NF or BCNF) each of the existing relation is in,and why. Place your answer into the file A1__.doc.Task 3 (1 mark)Create the DDL scripts to implement the relevant tables in MySQL. Either dothis through the CASE tool (Workbench), or alternatively you may choose to createthe DDL scripts yourself using a text editor and save them in a file namedA1__.sql. Also copy and paste them into the fileA1__.doc.Task 4 (3 marks)Insert records into each of your tables (there should be a minimum of 3 recordsper table). When inserting records into the tables, make sure that the result of eachSQL query below will return at least one record. The SQL statements for this partshould also be saved in your A1__.sql file. Alsocopy and paste them into the file A1__.doc.Task 5 (6 marks)Provide SQL query expressions / statements for the following queries whichshould also be saved in your A1__.sql file. Notethat these SQL queries must be tested, and the query statements together with theirresults must also be placed in the A1__.doc file.a) Find the book title and price of historical books.b) Find the name and email address of all authors who wrote at least one fiction butno historical book.c) Find the total number of books published by each publisher.d) Find the total number of copies in the inventory (including all branches) foreach book. Include only the top five books based on the number of copiesavailable in the result set.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here