Hello I need this to be done in oracle, Create these tables and name the constra
ID: 3790594 • Letter: H
Question
Hello I need this to be done in oracle,
Create these tables and name the constraints
Creat sgl table IN oracle, table Columns DATA TYPE Constraint customer ustomer ID primary key Last name required First name salesperson Sales person ID rimary key required Last name: First name text; 11 characters only required; user will (Ctr) nter dashes: must be unique Hire date date required car Vinit primary key text, variable length to model text; up to 40 char Vehicle year integer number text, variable length to 20 characters price number with decimals required must be "Y" or N"; text; 1 character default to N sale discount decimal number, 0 to 1 default to 0 Sale ID integer number primary key sale Customer ID integer number required; foreign key to customer table: do not cascadeExplanation / Answer
create table customer(customer_id varchar(2) PRIMARY KEY, Last_name varchar(2) NOT NULL, First_name varchar(2));
create table salesperson(sales_person_id varchar(2) PRIMARY KEY, last_name varchar(2) NOT NULL, first_name varchar(2), SSN char(11) NOT NULL, hire_date DATE NOT NULL);
create table car(vin# varchar(2) PRIMARY KEY, make char(70), model cahr(40), vehicle_year integer, color char(20), price float NOT NULL, sold char(1) DEFAULT 'N', sale-discount float DEFAULT '0');
create table sale(sale_ID integer PRIMARY KEY, customer_id integer NOT NULL FOREIGN KEY to customer);
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.