-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDatabases
25 lines (6 loc) · 1.39 KB
/
Databases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
create table samira_theme_park(park_code varchar(10) primary key not null, park_name varchar(35) not null, park_city varchar(50) not null, park_counter char(2) not null);
create table samira_employee(emp_num numeric(4)primary key,emp_title varchar(4)not null,emp_lname varchar(15),emp_fname varchar(15)not null,emp_dob date not null,emp_hire_date date not null,emp_areacode varchar(4)not null,emp_phone varchar(12)not null,park_code varchar(10), foreign key(park_code) references samira_theme_park(park_code));
create table samira_ticket(ticket_no numeric(10),ticket_price numeric(4,2),ticket_type varchar(10),park_code varchar(10), foreign key(park_code) references samira_theme_park(park_code))
create table samira_attraction1(attract_no numeric(10)primary key,park_code varchar(10), foreign key(park_code) references samira_theme_park(park_code),attract_name varchar(35),attract_age numeric(3)not null,attract_capacity numeric(3)not null);
create table samira_hours(emp_num numeric(4),foreign key(emp_num) references samira_employee(emp_num),attract_no numeric(10), foreign key(attract_no) references samira_attraction1(attract_no),hours_per_attract numeric(2)not null,hours_rate numeric(4,2)not null,date_worked date not null);
create table samira_sales(transaction_no numeric primary key,park_code varchar(10), foreign key(park_code) references samira_theme_park(park_code),sale_date date not null);