In: Computer Science
Database Management Systems Question
a. Design a simple RETAIL store records database with 3 to 4 tables to track customer purchases of store products and answer the following questions about your database.
b. Create an instance (a state) of your database.
ANSWER :
a. There should be three tables in the RETAIL database namely : Products, Customer, Sales. The following Diagram clarifes the fields and relationships :
In Sales Table, Prod_ID is the foreign key which maps to the Product_ID of Products Table.
In Sales Table, Cust_ID is the foreign key which maps to the Customer_ID of Customer Table.
b.
CREATE DATABASE RETAIL USER SYS IDENTIFIED BY sys_password USER SYSTEM IDENTIFIED BY system_password EXTENT MANAGEMENT LOCAL DEFAULT TEMPORARY TABLESPACE temp UNDO TABLESPACE undotbs1 DEFAULT TABLESPACE users;
( PLEASE VOTE FOR THIS ANSWER )
I THINK IT WILL BE USEFULL TO YOU .......
PLZZZZZ COMMENT IF YOU HAVE ANY PROBLEM I WILL TRY TO SOLVE IT .......
THANK YOU .......