Answered step by step
Verified Expert Solution
Link Copied!

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 key(s) 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 i.e., bin number A1M 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 (e.g., Discount_UK_Code of 1 has a Discount_UK_Percent of 25 which means 25% 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 Definitions/Attributes:
Part (part_number_with_prefix, part_number, description, discount_sw_code, discount_sw_percent, krona_net, discount_uk_code, discount_uk_percent, sterling net)
Supplier (supplier_number, supplier_name, address, town, county, postcode, contact_number, email_address, country)
Warehouse (warehouse_id, address, town, county, postcode, contact_number)
Bin (bin_number, warehouse_id)
Location (part_number_with_prefix, bin_number, quantity)
Invoice (invoice_number, idate, vat_total, total_value, supplier_number)
InvoiceDetail (invoice_number, part_number_with_prefix, quantity, net_price, net_vat)
Use part_number_with_prefix as the PK for the part table.
Appendix B: [image]
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David Kroenke

11th Edition

0132302675, 9780132302678

More Books

Students also viewed these Databases questions