So, I made up my ERD for class, and I have been trying to implement it into the
ID: 3750950 • Letter: S
Question
So, I made up my ERD for class, and I have been trying to implement it into the actual access database, but I am having a problem figuring out how to make each table correctly, For example, when I implement the order table, how can I get multiple items to show up, when I can't use duplicate primary keys.
Sales Vendor PK InvoiceNo VendorlD Quanitiy Varchar (2) FirstName Varchar (20) Varchar (50) Varchar (50) Varchar Extended Last Name Customer_CustomerN FK City Customer State CustomerNo Zip Varchar (20) Varchar (50) Varchar (50) Varchar Name Phone street City State Order Zip OrderNo phone itemname int FK Inventory ISBN Date Date nventory PK FK tem-ID ISBN Varchar (30) Title Varchar Title Quant ity Quantityonhand Cost int Quant ityonorder Extended Order OrderNo Vendor_Vendor Order_item-IDExplanation / Answer
Very Simple:- You already have say ORDER Table and INVENTORY TABLE. So for a particular Order if we want to display multiple items from the inventory we nned to create a Junction Table called "ORDER_HISTORY" which will have 2 columns (OrderNo, ISBN) where OrderNo is the Primary Key for Order Table and ISBN is the PK for INVENTORY Table.
It will look like this:-
ORDER_HISTORY
Please let me know in case of any clarifications required. Thanks!
OrderNo ISBN 100 123-456-9XXX 100 234-678-YYYY 100 100-200-ZZZZRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.