This document provides a complete database project report and presentation for the assessment. It includes an entity relationship diagram, normalization, relational schema, MySQL database, and more. The assignment's main objective is to design and develop the database system of AMC. The logical and physical designs are made in the assignment.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
Group Member ID: Group Member Name: Report Contents Report..........................................................................................................................................................2 Part A: Entity Relationship Diagram...........................................................................................................3 Case Study Requirements........................................................................................................................3 ER Diagram.............................................................................................................................................4 Part B: Normalization..................................................................................................................................5 Part C: Relational Schema and MySQL database........................................................................................7 Relational Schema...................................................................................................................................7 MySQL Database..................................................................................................................................12 Database Tables.................................................................................................................................13 Records..................................................................................................................................................16 Referential Integrity Constraint.............................................................................................................22 Part D: SQL...............................................................................................................................................27 References.................................................................................................................................................33 Database Management for Business ISY1002/ISY103Page2
Group Member ID: Group Member Name: Mission The assignment’s main objective is to design and develop the database system of AMC. The logical and physical both designs are made in the assignment. The logical design is used to show the system requirement while the physical database is implemented on the basis of logical design. The assignment is showing the database requirements by ER diagram and the database is implemented in MYSQL database. Part A: Entity Relationship Diagram Case Study Requirements 1.There are lots of employees who work in one store. 2.One manager will be appointed for one store from the employees of the store only. 3.One supervisor will be appointed for one department from the employees of the department only. 4.An employee can work for only one store. 5.The inventory of products will have to be maintained on regular basis. 6.The product details will be saved into the database. 7.The customer details will be saved into the database. 8.The supplier details will be saved into the database. 9.The store details will be saved into the database. Database Management for Business ISY1002/ISY103Page3
Group Member ID: Group Member Name: ER Diagram (Tutorialcup 2015) (Ziff Davis 2017) (Smartdraw 2016) Database Management for Business ISY1002/ISY103Page4
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Group Member ID: Group Member Name: Part B: Normalization The database is in third normal form if the following rules are applied on the database- -All tables have primary key and no repeated group. -All fields in every table depend upon the primary key. -No table has transitive dependency. TbllEmployee (flldemployeeNumber, flldfirstName, flldlastName, flldaddress, flldmobile, flldemail, flldTFN, flldjoiningDate) The table is in third normal form because it is satisfying rules of third normal form as mentioned above. TbllfullTimeEmployee (flldemployeeNumber, flldannualSalary) The table is in third normal form because it is satisfying rules of third normal form as mentioned above. TbllcasualEmployee (flldemployeeNumber, flldhourlyRate) The table is in third normal form because it is satisfying rules of third normal form as mentioned above. TbllDepartment (fllddepartmentNumber, flldtitle, flldphone, flldemail, flldsupervisorEmpID) The table is in third normal form because it is satisfying rules of third normal form as mentioned above. TbllStore (flldstoreID, flldstoreName, flldphone, flldemail, flldfax, flldstreetAddress, flldsuburb, flldstate, flldpostcode, flldmanagerID) The table is in third normal form because it is satisfying rules of third normal form as mentioned above. TbllDepartmentStore (flldstoreID, fllddepartmentNumber) The table is in third normal form because it is satisfying rules of third normal form as mentioned above. TbllStoreEmployee (flldemployeeNumber ,flldstoreID, fllddepartmentNumber) The table is in third normal form because it is satisfying rules of third normal form as mentioned above. Database Management for Business ISY1002/ISY103Page5
Group Member ID: Group Member Name: TbllCategory (flldcategory, fllddescription) The table is in third normal form because it is satisfying rules of third normal form as mentioned above. TbllProduct (flldproductNumber, flldtitle, flldbrand, fllddescription, flldprice, flldcategory) The table is in third normal form because it is satisfying rules of third normal form as mentioned above. TbllSupplier (flldsupplierID, flldfirstName, flldlastName, flldaddress, flldmobile, flldemail) The table is in third normal form because it is satisfying rules of third normal form as mentioned above. TbllSupplierProduct (flldsupplierID,flldproductNumber, flldqtyAvailable, flldqtyOrdered) The table is in third normal form because it is satisfying rules of third normal form as mentioned above. TbllPatron (flldcustomerNumber, flldfirstName, flldlastName, flldaddress, flldmobile) The table is in third normal form because it is satisfying rules of third normal form as mentioned above. TbllOrder (flldorderNumber,flldproductNumber, flldorderDate, flldquantity, flldcustomerNumber) The table is in third normal form because it is satisfying rules of third normal form as mentioned above. TbllPaySlip (flldpayslipNumber, flldworkedHours, flldemployeeNumber, flldstoried, flldgrossPay) The table is in third normal form because it is satisfying rules of third normal form as mentioned above. Database Management for Business ISY1002/ISY103Page6
Group Member ID: Group Member Name: Part C: Relational Schema and MySQL database Relational Schema TbllEmployee Table Field NameData TypeLengthKey Constraints flldemployeeNumberintegerPrimary Key flldfirstNameVarchar20 flldlastNameVarchar20 flldaddressVarchar40 flldmobileVarchar20 flldEmailVarchar30 flldTFNVarchar20 flldjoiningDateDatetime TbllFulltimeEmployee Table Field NameData TypeLengthKey Constraints flldemployeeNumberintegerPrimary Key Foreign Key references TbllEmployee (flldemployeeNumber) flldannualSalarydouble TbllCasualEmployee Table Field NameData TypeLengthKey Constraints flldemployeeNumberintegerPrimary Key Foreign Key references TbllEmployee (flldemployeeNumber) flldhourlyRatedouble Database Management for Business ISY1002/ISY103Page7
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Group Member ID: Group Member Name: TbllStoreEmployee Table TbllSupplierProduct Table Database Management for Business ISY1002/ISY103Page26
Group Member ID: Group Member Name: Part D: SQL Question 1 SQLselect flldcustomerNumber, concat(flldfirstName,' ',flldlastName) 'Customer Full Name', flldmobile, flldaddress from TbllPatron order by flldcustomerNumber desc; Output+--------------------+--------------------+------------ +---------------+ | flldcustomerNumber | Customer Full Name | flldmobile | flldaddress| +--------------------+--------------------+------------ +---------------+ |5 | Henry Smith| 3264264711 | 99 Lee Rd.| |4 | Harry Kevin| 3264264722 | 19 Lee Rd.| |3 | John Lee| 3264264733 | 78 White Rd.| |2 | ElloraWhite| 3264264744 | 77 Smith St.| |1 | Zain Lee| 3264264747 | 24 Church St. | +--------------------+--------------------+------------ Database Management for Business ISY1002/ISY103Page27
Group Member ID: Group Member Name: +---------------+ Question 2 SQLselect * from TbllProduct where flldprice<100; Output| flldproductNumber | flldtitle| flldbrand| fllddescription| flldpr ice | flldcategory | +-------------------+-------------+--------------- +---------------------+------- ----+--------------+ | P2| Pant| Peter England | Peter England Pant| 2 | Cloth| | P3| Shirt| Peter England | Peter England Shirt | 3 | Cloth| | P4| Face Powder | Max| Max Face Powder| 9 | Beauty| | P5| Hair Cream| Max| Max Hair Cream| 4 | Beauty| +-------------------+-------------+--------------- +---------------------+---- Question 3 SQLselect tbllProductOrder.flldorderNumber, tbllProductOrder.flldproductNumb er, tbllProduct.flldtitle, tbllProductOrder.flldquantity, tbllProduct.flldprice,(tbllProductOrder.flldquantity * tbllProduct.flldprice) as TotalAmountfrom tbllProductOrder inner join tbllProduct on tbllProduct.flldproductNumber=tbllProdu ctOrder.flldproductNumber where flldorderNumber=1005; Output+-----------------+-------------------+-------------+-------------- +-----------+ -------------+ | flldorderNumber | flldproductNumber | flldtitle| flldquantity | flldprice | TotalAmount | +-----------------+-------------------+-------------+-------------- +-----------+ -------------+ |1005 | P4| Face Powder |4 | 9 | 36 | |1005 | P5| Hair Cream|4 | 4 | 16 | +-----------------+-------------------+-------------+-------------- +-----------+ Database Management for Business ISY1002/ISY103Page28
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Group Member ID: Group Member Name: Question 10 SQLselect flldcustomerNumber, count(flldorderNumber) NumberOfOrders from TbllPr oductOrder group by flldcustomerNumber; Output+--------------------+----------------+ | flldcustomerNumber | NumberOfOrders | +--------------------+----------------+ |1 |2 | |2 |1 | |3 |2 | |4 |2 | +--------------------+----------------+ Question 11 SQLselect flldorderNumber, flldorderDate, count(flldproductNumber) as NumberOfP roducts from TbllProductOrder group by flldorderNumber, flldorderDate; Output+-----------------+---------------------+------------------+ | flldorderNumber | flldorderDate| NumberOfProducts | +-----------------+---------------------+------------------+ |1001 | 2017-05-22 00:00:00 |1 | |1002 | 2017-10-12 00:00:00 |1 | |1003 | 2018-08-11 00:00:00 |1 | |1004 | 2017-11-12 00:00:00 |2 | |1005 | 2017-12-15 00:00:00 |2 | +-----------------+---------------------+------------------+ Database Management for Business ISY1002/ISY103Page32
Group Member ID: Group Member Name: References Tutorialcup (2015), ER Data Model [online] Available from: https://www.tutorialcup.com/dbms/er-data-model.htm [Accessed: 3 June 2019] Ziff Davis (2017), Understanding Relationships in E-R Diagrams [online] Available from: http://it.toolbox.com/blogs/enterprise-solutions/understanding-relationships-in-er-diagrams- 14310 [Accessed: 3 June 2019] Smartdraw (2016). Entity Relationship Diagram. [online] Available from: https://www.smartdraw.com/entity-relationship-diagram/. [Accessed: 3 June 2019] Edugrabs.com (2015), Types of Attributes in DBMS with Example (ER MODEL – Part 2), [online] Available from:http://www.edugrabs.com/type-of-attributes-in-dbms/.[Accessed: 3 June 2019] Database Management for Business ISY1002/ISY103Page33