Create a database for a store that sells outdoor camping and sporting goods. The
ID: 3546622 • Letter: C
Question
Create a database for a store that sells outdoor camping and sporting goods. The tables should be as shown. See attached document for further explanations and examples:
1. Customers: CustID (PK), FName, LName, Address, City, State, zipcode, email.
2. Clothes: ItemNo (primary key), type, label, gender, Color, size
3. Equipment: equipID (PK), type, manufacture, color, material
4. CustomerSales: CustID (FK) and ItemNo (FK)
5. Vendor: VendorID (PK), ItemType (clothes, equipment, etc), address, city, state, zip, phoneNo, email
Explanation / Answer
Create a database for a store that sells outdoor camping and sporting goods. The tables should be as shown. See attached document for further explanations and examples:
1. Customers: CustID (PK), FName, LName, Address, City, State, zipcode, email.
create table Customers(CustID number primary key, FName varchar2(100), LName varchar2(100), Address varchar2(100), City varchar2(5), State varchar2(50), zipcode number(20), email varchar2(50));
2. Clothes: ItemNo (primary key), type, label, gender, Color, size
create table cloths ( ItemNo number(20) primary key, type varchar2(20), label varchar2(10), gender varchar2(10), Color varchar2(20), size number(10));
3. Equipment: equipID (PK), type, manufacture, color, material
create table Equipment (equipID number(20) primary key, type varchar2(20), manufacture varchar2(20), color varchar2(20), material varchar2(20));
4. CustomerSales: CustID (FK) and ItemNo (FK)
create table CustomerSales (CustID number constraint fk_custid references Customers(CustID), ItemNo number constraint fk_itemno references Cloths(itemno));
5. Vendor: VendorID (PK), ItemType (clothes, equipment, etc), address, city, state, zip, phoneNo, email
create table Vendor (VendorID number primary key, ItemType varchar2(20), address varchar2(20), city varchar2(50), state varchar2(20), zip number(10), phoneNo number(20), email varchar2(50));
If you want you can change the datatype and size. Above size is just assumption.
Thanks a lot.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.