Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using the simplified partial given ERD ( appendix B ) , analyse the requirements ( appendix A ) and then: Produce a script suitable for
Using the simplified partial given ERD appendix B analyse the requirements appendix A and then:
Produce a script suitable for SQL Developer to create the tables in the ERD appendix B Remember to define a primary and foreign keys where necessary using constraints. Entity definitions are found in appendix C
You will require some numeric data types for certain attributes so that you can comply with the requirement for numeric functions in queries. There is an example in appendix C
Appendix A
EuroParts.com is an established company in UK It deals with the import and export of car parts. The companys suppliers are based in the UK and Sweden.
EuroParts.com has a warehouse in Haverfordwest and another in Stansted and both hold a stock of parts. Steve is manager of the Haverfordwest branch and Peter manages the Stansted warehouse. Each warehouse has many storage bins comprised of shelves and each shelf will have many plastic part storage containers which are numbered. For simplicity only use the shelf numbers.
Part prices are in two currencies, UK sterling, and Swedish krona. All part prices are net of Vat.
a Each warehouse would have a unique set of bins numbers ie bin number AM located in Warehouse ID Steve Haverfordwest would not be found in Warehouse ID Peter Essex
b Some bin shelves location may be empty.
c There will be no requirement for additional warehouses.
d There may be new suppliers.
e There may be new parts.
f The same part may be kept in both warehouses.
g The entity Location is the shelf location on a bin. A bin will have several shelves.
h The part number prefix the first two digits, identifies whether the part is for bodywork, engine, accessory etc.
i The discount code and discount percentage are the markup on the part eg DiscountUKCode of has a DiscountUKPercent of which means profit The net cost of parts is in both UK sterling and Swedish Krona.
j For simplicity the Invoice contains a minimum number of attributes.
There is a M:N relationship between supplier and part but this will not be investigated for the purposes of this task. It can be ignored. There would also be a relationship between supplier and warehouse but this is also outside the remit of this system.
Appendix C Entity DefinitionsAttributes:
Part partnumberwithprefix, partnumber, description, discountswcode, discountswpercent, kronanet, discountukcode, discountukpercent, sterling net
Supplier suppliernumber, suppliername, address, town, county, postcode, contactnumber, emailaddress, country
Warehouse warehouseid address, town, county, postcode, contactnumber
Bin binnumber, warehouseid
Location partnumberwithprefix, binnumber, quantity
Invoice invoicenumber, idate, vattotal, totalvalue, suppliernumber
InvoiceDetail invoicenumber, partnumberwithprefix, quantity, netprice, netvat
Use partnumberwithprefix as the PK for the part table.
Appendix B: image
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started