Consider the following set of requirements to maintain a warehouse store database:
You should record the store with store ID, store name and location. There are more than one stores in a city, one store is a supervise store.
Stores sell products. You should record each product as product code, name and price. Different stores may supply different price for same product.
The database should also maintain customer information. You should record the name, address, phone number of each customer.
An invoice is written for a single customer, but a customer can have many invoices. You should record invoice number, the date of an invoice issued.
You should record items of each invoice which describe the products bought by the customer. You should record the quantity of each product.
According to the information above, draw a corresponding ER diagram. Please note:
a) You can decide the names for entities, attributes and relations, but you should use UPPERCASE to name your entities and use Capitalisation to name attributes of entities.
b) Underline all primary key attributes, and put (f.k) next to all the foreign key attributes.
c) Clearly indicate participation and cardinalities between entities.
answer:
i did draw the following diagram, only issue is how to links invoice-customer-product ?
you should record items of each invoice which describers the products brought by the customer .record quantity?
For this i tried to make a table "invoice/customer" but then how to add product when it has no link with product?
You should record the store with store ID, store name and location. There are more than one stores in a city, one store is a supervise store.
Stores sell products. You should record each product as product code, name and price. Different stores may supply different price for same product.
The database should also maintain customer information. You should record the name, address, phone number of each customer.
An invoice is written for a single customer, but a customer can have many invoices. You should record invoice number, the date of an invoice issued.
You should record items of each invoice which describe the products bought by the customer. You should record the quantity of each product.
According to the information above, draw a corresponding ER diagram. Please note:
a) You can decide the names for entities, attributes and relations, but you should use UPPERCASE to name your entities and use Capitalisation to name attributes of entities.
b) Underline all primary key attributes, and put (f.k) next to all the foreign key attributes.
c) Clearly indicate participation and cardinalities between entities.
answer:
i did draw the following diagram, only issue is how to links invoice-customer-product ?
you should record items of each invoice which describers the products brought by the customer .record quantity?
For this i tried to make a table "invoice/customer" but then how to add product when it has no link with product?