一、项目背景
1.1公司介绍
英皇集团一直积极发展其电影业务,英皇电影集团包括三大电影品牌。
英皇电影城 自2015年成立以来,已在中国大陆多个城市落地。
在北京长安街的旗舰店是其在大陆的首映场。自2017年起,
香港的英皇电影院进驻了中环置地娱乐大厦、屯门美罗广场、马鞍山的阳光城中心、荃湾的荃新天地、尖沙咀的国际广场等。
进驻将军澳的香港城和铜锣湾的时代广场,标志着集团业务的另一个里程碑。2021年,英皇电影院进驻澳门,为当地电影观众提供优质的观影体验。
1.2 项目背景
本项目的主要目的是为英皇电影院设计一个电影院管理系统,以便英皇电影院的管理员可以在这个系统中,安排、取消、搜索或改变电影的档期,如电影名称、影厅、时间和座位,以及客户信息,如客户姓名、客户电话号码和客户的会员信息等。
二、Entity-Relationships description
三、数据库设计
3.1conceptual design
3.2logical design
3.3Show all functional dependencies in relations and demonstrate that all relations are in 3NF
3.4每个字段的数据类型
3.5 每个表的索引
四、数据库实现(SQL Server)
4.1创建表
注:数据为示例,非真实数据
CREATE TABLE customer(
customer_id varchar(8) Not NULL primary key,
customer_sex varchar(6) not null,
customer_name varchar(100) not null,
customer_frequency int not null,
customer_phone int,
customer_year int,
member_id varchar(8),
);
CREATE TABLE member(
member_id varchar(8) not null primary key,
member_name varchar(100) not null,
member_discount decimal(3,2) not null,
);
CREATE TABLE movie(
movie_id varchar(8) not null primary key,
movie_name varchar(100) not null,
movie_type varchar(100) not null,
movie_nation varchar(100) not null,
);
CREATE TABLE seat(
seat_id varchar(6) not null primary key,
seat_hall varchar(2) not null,
seat_row varchar(2) not null,
seat_column varchar(2) not null,
);
CREATE TABLE schedule(
schedule_id varchar(8) not null primary key,
movie_id varchar(8) not null foreign key references movie(movie_id),
schedule_hall varchar(2) not null,
price decimal(4,2) not null,
movie_time varchar(8) not null,
);
CREATE TABLE orders(
order_id varchar(8) not null primary key,
customer_id varchar(8) Not NULL foreign key references customer(customer_id),
schedule_id varchar(8) not null foreign key references schedule(schedule_id),
Price decimal(4,2) not null,
seat_id varchar(6) not null foreign key references seat(seat_id),
);
insert into customer values('10000001','male','ken', 4,43675849,29,'');
insert into customer values('10000002','female','angle',5,43645849,26,'20000002');
insert into customer values('10000003',