Question: Summary Create tables using create table statements in SQL Each table must have a primary key, which might span more than one column. When appropriate,
Summary
- Create tables using create table statements in SQL
- Each table must have a primary key, which might span more than one column.
- When appropriate, you should create a check constraint for a column to enforce the value restriction described.

There are 4 relations in the schema. Each are described below along with their integrity constraints . Player ( playerlD: number(9), name : varchar2(50) position varchar2(10), height: number(3) weight: number(3) team: varchar2(30) o Each Player is assigned a unique playerlD o The position of a player can either be Guard, Center or Forward o The team field is a foreign key to Team o height and weight can be NULL, but no other column may be . Team name: varchar2(30), city varchar2(20) o o o Each Team has a unique name associated with it. There can be multiple teams from the same city No column may be NULL . Game ( gamelD: number(9) homeTeam: varchar2(30), awayTeam : varchar2(30) homeScore number(3) awayScore : number(3), o Each Game has a unique gamelD o The fields homeTeam and awayTeam are foreign keys to Team. o Two teams may play each other multiple times each season o There is an integrity check to ensure home Team and awayTeam are different o Both homeScore and awayScore must be non-negative values o No column may be NULL . GameStats ( playerlD: number(9), gamelD: number(9) points: number(3), assists: number(3), rebounds: number(3), o GameStats records the performance statistics of a player within a game o A player may not play in every game, in which case he/she will not have his/her statistics recorded for that game o gamelD is a foreign key to Game o playerlD is a foreign key to Player o No column may be NULL
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
