Data
|
Type & Size
|
Format
|
Saloon name
|
Char – 30
|
Text
|
Max_row_number
|
Integer
|
Number
|
Max_col_number
|
Integer
|
Number
|
============================================================
Saloon Structure
CREATE TABLE Saloon_structure
(
saloon_name CHAR(30),
row_number INTEGER,
col_number INTEGER,
PRIMARY KEY(saloon_name,row_number,col_number),
FOREIGN KEY(saloon_name) REFERENCES
);
Data
|
Type & Size
|
Format
|
Saloon name
|
Char – 30
|
Text
|
row_number
|
Integer
|
Number
|
col_number
|
Integer
|
Number
|
============================================================
Show time
CREATE TABLE Show_time
(
saloon_name CHAR(30),
show_date DATE,
timee CHAR(5),
film_name CHAR(15),
show_ID INTEGER,
PRIMARY KEY(show_ID),
FOREIGN KEY (saloon_name) REFERENCES Saloon,
UNIQUE (saloon_name,show_date,timee)
);
Data
|
Type & Size
|
Format
|
Saloon name
|
Char – 30
|
Text
|
Date
|
Char – 10
|
Date/Time
|
Time
|
Char- 10
|
Date/Time
|
Film name
|
Char – 15
|
Text
|
Show ID
|
Integer
|
Number
|
============================================================
CREATE TABLE Order
(
show_ID INTEGER,
row_number INTEGER,
col_number INTEGER,
card_number CHAR(16),
reservation_sale CHAR(1),
given CHAR(1),
PRIMARY KEY(show_ID,row_number,col_number),
FOREIGN KEY (show_ID) REFERENCES Show_time,
FOREIGN KEY (card_number) REFERENCES Bank
);
Data
|
Type & Size
|
Format
|
Show ID
|
Integer
|
Number
|
Row number
|
Integer
|
Number
|
Column number
|
Integer
|
Number
|
Card number
|
Char – 16
|
Text
|
Reservation or sale
|
Char-1
|
Text
|
Given
|
Yes/No
|
Yes/No
|
============================================================
Customer
CREATE TABLE Customer
(
name CHAR(30),
surname CHAR(25),
account_number CHAR(16),
password CHAR(15),
FOREIGN KEY (account_number) REFERENCES Account
);
Data
|
Type & Size
|
Format
|
Name
|
Char – 25
|
Text
|
Surname
|
Char – 25
|
Text
|
Account number
|
Char – 16
|
Text
|
Password
|
Char – 15
|
Text i.e. hidden ******
|
============================================================
Bank
CREATE TABLE Bank
(
account_number CHAR(16),
money_amount INTEGER,
PRIMARY KEY(account_number)
);
Data
|
Type & Size
|
Format
|
Account number
|
Char – 16
|
Text
|
Money amount
|
Integer
|
Number
|
===========================================================