Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the following Schema to provide SQL queries and relational expressions for these statements. CREATE TABLE Supplier ( SID bigsera primary key, supplier id SName

Use the following Schema to provide SQL queries and relational expressions for these statements.
image text in transcribed
image text in transcribed
image text in transcribed
CREATE TABLE Supplier ( SID bigsera primary key, supplier id SName varchar(10) NOT NULL, supplier name Status varchar(10) NOT NULL, -supplier status (a government designation) City varchar(10) NOT NULL supplier city (where it is located) CREATE TABLE Part PID bigseria primary key, part id PName varchar(10) NOT NULL, .. part name Color char(10) NOT NULL,--part color Weight real price real NOT NULL, part weight (in lbs) NOT NULL-part price (in S) CREATE TABLE Shipment ( SID bigint FOREIGN KEY REFERENCES Supplier(SID),-supplier id PID bigint FOREIGN KEY REFERENCES Part(PID),--part id Qty nt NOT NULL, quantity shipped PRIMARY KEY (SID, PID) CREATE TABLE Customer ( CID bigserial CName varchar(10) NOT NULL, customer name Phone varchar(10) NOT NULL, customer phone number City varchar(10) NOT NULL -customer city (where it is located) primary key, customer id CREATE TABLE PartPurchase ( SID bigint FOREIGN KEY REFERENCES Supplier(SID),-supplier id PID bigint FOREIGN KEY REFERENCES Part(PID), part id CID bigint FOREIGN KEY REFERENCES Customer (CID), customer id Qty n NOT NULL, -quantity of parts purchased by customer from supplier PRIMARY KEY (SID, PID, CID)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions