【完整数据库设计图&SQL代码】英皇电影院电影管理系统

一、项目背景

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',
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值