Question
Answered step-by-step
I need help generating the table with sql...
I need help generating the table with sql
_______________________________________________________________________________________________
...
Question
Answered step-by-step
I need help generating the table with sql...
I need help generating the table with sql
_________________________________________________________________________________________________
University Database Schema (all but primary key constraints have been removed)
create table department (
dept_name varchar(20),
building varchar(15),
budget numeric(12,2)
primary key (dept_name));
create table instructor (
ID varchar(5),
name varchar(20) not null,
dept_name varchar(20),
salary numeric(8,2),
primary key (ID));
create table course (
course_id varchar(8),
title varchar(50),
dept_name varchar(20),
credits numeric(2,0),
primary key (course_id));
create table teaches (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
primary key (ID,course_id,sec_id,semester,year));
create table section (
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
building varchar(15),
room_number varchar(7),
time_slot_id varchar(4),
primary key (course_id, sec_id,
semester, year));
create table student (
ID varchar(5),
name varchar(20) not null,
dept_name varchar(20),
tot_cred numeric(3,0,
primary key (ID));
create table time_slot (
time_slot_id varchar(4),
day varchar(1),
start_hr numeric(2),
start_min numeric(2),
end_hr numeric(2),
end_min numeric(2),
primary key (time_slot_id,day,start_hr,start_min));
create table takes (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
grade varchar(2),
primary key (ID,course_id,sec_id,semester,year));
[Show More]