Question: Write SQL quries based on the following schema and tables. CREATE TABLE Person( Id INTEGER PRIMARY KEY, name VARCHAR (20) UNIQUE NOT NULL CREATE TABLE

 Write SQL quries based on the following schema and tables. CREATE
TABLE Person( Id INTEGER PRIMARY KEY, name VARCHAR (20) UNIQUE NOT NULL

Write SQL quries based on the following schema and tables. CREATE TABLE Person( Id INTEGER PRIMARY KEY, name VARCHAR (20) UNIQUE NOT NULL CREATE TABLE Beer( Id INTEGER PRIMARY KEY name VARCHAR (20) UNIQUE NOT NULL CREATE TABLE Bar ( Id INTEGER PRIMARY KEY name VARCHAR (20) UNIQUE NOT NULL CREATE TABLE Likes ( PersonId INTEGER NOT NULL REFERENCES Person (Id) BeerId INTEGER NOT NULL REFERENCES Beer (Id) CONSTRAINT LikesPK PRIMARY KEY (PersonId, Beerla) CREATE TABLE Serves BarId INTEGER NOT NULL REFERENCES Bar(Id) BeerId INTEGER NOT NULL REFERENCES Beer (d) CONSTRAINT ServesPK PRIMARY KEY (Barid, Beerid) CREATE TABLE Goes( Personid INTEGER NOT NULL REFERENCES Person (Id), Barid INTEGER NOT NULL REFERENCES Bar (Id), CONSTRAINT GoesPK PRIMARY KEY (PersonId, Barid) BE RSO BAR ld Name ld Name Name SERVES GOES Personid Barld Barld Beerld LIKES erson Boend

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!