This document provides study material and solved assignments for Database Management for Business. It includes topics such as entity relationship diagrams, normalization, relational schema, MySQL database, and SQL. The document also includes a case study and references for further reading.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
Database Management for Business ISY1002/ISY103 Student ID: Student Name: 6/1/2019
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Group Members ID: Group Members Name: Contents Part A: Entity Relationship Diagram...........................................................................................................3 Case Study Requirements........................................................................................................................3 ER Diagram.............................................................................................................................................3 Part B: Normalization..................................................................................................................................4 Part C: Relational Schema and MySQL database........................................................................................6 Relational Schema...................................................................................................................................6 MySQL Database..................................................................................................................................11 Database Tables.................................................................................................................................12 Database Records..................................................................................................................................17 Part D: SQL...............................................................................................................................................26 References.................................................................................................................................................33 2ISY1002/ISY103 Database Management for Business
Group Members ID: Group Members Name: Report Part A: Entity Relationship Diagram Case Study Requirements 1.There may be number of employees in a store. 2.There will be only one manager in every store from the employees of the store. 3.There will be only one supervisor in every department from the employees of the store. 4.Product inventory will be maintained into the database. 5.An employee cannot be employed at more than one store. 6.Employees are stored separately with complete detail like name, address etc. 7.Customers are stored separately with complete detail like name, address etc. 8.Products are stored separately with complete detail like product number, name etc. 9.Stores are stored separately with complete detail store id, store name, address etc. 10.All orders are stored in the database with all products in the orders and customers also. 3ISY1002/ISY103 Database Management for Business
Group Members ID: Group Members Name: ER Diagram (BeginnersBook. 2019) 4ISY1002/ISY103 Database Management for Business
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Group Members ID: Group Members Name: Part B: Normalization (TechTarget 2019) 5ISY1002/ISY103 Database Management for Business
Group Members ID: Group Members Name: TblEmployee (fldemployeeNumber, fldfirstName, fldlastName, fldaddress, fldmobile, fldemail, fldTFN, fldjoiningDate) Normalization: Third Normal Form TblfullTimeEmployee (fldemployeeNumber, fldannualSalary) Normalization: Third Normal Form TblcasualEmployee (fldemployeeNumber, fldhourlyRate) Normalization: Third Normal Form TblDepartment (flddepartmentNumber, fldtitle, fldphone, fldemail, fldsupervisorEmpID) Normalization: Third Normal Form TblStore (fldstoreID, fldstoreName, fldphone, fldemail, fldfax, fldstreetAddress, fldsuburb, fldstate, fldpostcode, fldmanagerID) Normalization: Third Normal Form TblDepartmentStore (fldstoreID, flddepartmentNumber) Normalization: Third Normal Form TblStoreEmployee (fldemployeeNumber ,fldstoreID, flddepartmentNumber) Normalization: Third Normal Form TblProduct (fldproductNumber, fldtitle, fldbrand, flddescription, fldprice, fldcategory) Normalization: Third Normal Form TblSupplier (fldsupplierID, fldfirstName, fldlastName, fldaddress, fldmobile, fldemail) Normalization: Third Normal Form TblSupplierProduct (fldsupplierID,fldproductNumber, fldqtyAvailable, fldqtyOrdered) Normalization: Third Normal Form TblPatron (fldcustomerNumber, fldfirstName, fldlastName, fldaddress, fldmobile) Normalization: Third Normal Form 6ISY1002/ISY103 Database Management for Business
Group Members ID: Group Members Name: TblOrder (fldorderNumber,fldproductNumber, fldorderDate, fldquantity, fldcustomerNumber) Normalization: Third Normal Form TblPaySlip (fldpayslipNumber, fldworkedHours, fldemployeeNumber, fldstoried, fldgrossPay) Normalization: Third Normal Form Rules of 3 NF- -There should be no repeated group in the table and all tables have primary key. -All fields depend upon that primary key completely. -There is no transitive independency in any table. The AMC database is following all the mentioned rules. Therefore, it’s all tables are in 3 NF. (Study.com 2019) (The Crazy Programmer 2019) Part C: Relational Schema and MySQL database Relational Schema tblEmployee Table Field NameData TypeLengthKey Constraints fldemployeeNumberintegerPrimary Key fldfirstNameVarchar30 fldlastNameVarchar30 fldaddressVarchar50 fldmobileVarchar20 fldEmailVarchar50 fldTFNVarchar20 fldjoiningDateDatetime tblFulltimeEmployee Table Field NameData TypeLengthKey Constraints fldemployeeNumberintegerPrimary Key Foreign Key references 7ISY1002/ISY103 Database Management for Business
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Group Members ID: Group Members Name: |3 |15 |6 |3 | 4 80 | +------------------+----------------+-------------------+------------ +---------- ---+ select * from tblSupplier; +---------------+--------------+-------------+--------------+------------- +----- --------------+ | fldsupplierID | fldfirstName| fldlastName | fldaddress| fldmobile| flde mail| +---------------+--------------+-------------+--------------+------------- +----- --------------+ |1 | Eli| Jackson| 44 Ring Road | 2398734512| eli@ gmail.com| |2 | Michael| Wilson| 34 Link Road | 23998094512 | mich ael@gmail.com | |3 | Micky| Wilson| 34 Link Road | 2398739822| mick y@gmail.com| +---------------+--------------+-------------+--------------+------------- +----- --------------+ 23ISY1002/ISY103 Database Management for Business
Group Members ID: Group Members Name: select * from tblProduct; +------------------+-----------------+----------+-----------------+---------- +-- -----------+ | fldproductNumber | fldtitle| fldbrand | flddescription| fldprice | f ldcategory | +------------------+-----------------+----------+-----------------+---------- +-- -----------+ | P101| Washing Machine | Lloyd| Washing Machine |120 | E lectronics | | P102| Shirt| Levis| Levis Shirt|5 | C loth| | P103| T-shirt| Levis| Levis Shirt|6 | C loth| | P104| Shampoo| Ole| Ole Shampoo|8 | B eauty| | P105| Cream| Ole| Ole Cream|9 | B eauty| +------------------+-----------------+----------+-----------------+---------- +-- -----------+ 24ISY1002/ISY103 Database Management for Business
Group Members ID: Group Members Name: select * from tblSupplierProduct; +---------------+------------------+-----------------+---------------+ | fldsupplierID | fldproductNumber | fldqtyAvailable | fldqtyOrdered | +---------------+------------------+-----------------+---------------+ |1 | P101|15 |10 | |2 | P102|25 |15 | |2 | P104|20 |10 | |3 | P103|10 |5 | |3 | P105|20 |10 | +---------------+------------------+-----------------+---------------+ mysql> select * from tblPatron; +-------------------+--------------+-------------+---------------- +------------+ | fldcustomerNumber | fldfirstName | fldlastName | fldaddress| fldmobile | +-------------------+--------------+-------------+---------------- +------------+ |1 | Harry| Wilson| 14 Robert Av.| 5366378338 | |2 | Finn| Brown| 34 George Av.| 5678234167 | |3 | Max| Lee| 32 Smith Rd.| 8934579858 | 25ISY1002/ISY103 Database Management for Business
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Group Members ID: Group Members Name: +----------------+------------------+---------------------+------------- +------- ------------+ Question 10 select fldcustomerNumber, count(fldorderNumber) NumberOfOrders from tblPr oductOrder group by fldcustomerNumber; +-------------------+----------------+ | fldcustomerNumber | NumberOfOrders | +-------------------+----------------+ |1 |2 | |2 |1 | |3 |2 | |4 |2 | +-------------------+----------------+ Question 11 select fldorderNumber, fldorderDate, count(fldproductNumber) as NumberOfP roducts from tblProductOrder group by fldorderNumber, fldorderDate; +----------------+---------------------+------------------+ | fldorderNumber | fldorderDate| NumberOfProducts | +----------------+---------------------+------------------+ |1001 | 2017-06-30 00:00:00 |1 | |1002 | 2017-09-12 00:00:00 |1 | |1003 | 2018-07-11 00:00:00 |1 | |1004 | 2017-12-12 00:00:00 |2 | |1005 | 2017-10-15 00:00:00 |2 | +----------------+---------------------+------------------+ 33ISY1002/ISY103 Database Management for Business
Group Members ID: Group Members Name: References Study.com (2019). What is Normal Form in DBMS? - Types & Examples. [Online]. Available: https://study.com/academy/lesson/what-is-normal-form-in-dbms-types-examples.html. [Accessed: 1-June-2019] The Crazy Programmer (2019). Normalization in DBMS – 1NF, 2NF, 3NF and BCNF. [Online]. Available:https://www.thecrazyprogrammer.com/2017/06/normalization-in-dbms.html. [Accessed: 1-June-2019] BeginnersBook. (2019). Entity Relationship Diagram – ER Diagram in DBMS. [Online]. Available: https://beginnersbook.com/2015/04/e-r-model-in-dbms/. [Accessed: 1-June-2019] TechTarget (2019). Database normalization in MySQL: Four quick and easy steps.[Online]. Available: https://www.computerweekly.com/tutorial/Database-normalization-in-MySQL-Four- quick-and-easy-steps. [Accessed: 1-June-2019] 34ISY1002/ISY103 Database Management for Business