【VIP专享】数据库期中考试1
数据库期中试卷及参考答案

数据库期中试卷及参考答案《数据库原理与应用》一.单项选择题(每题1分,共 20分)1.目前市场上常见的DBMS 90% 以上都是基于(C )数据模型的。
A .层次B .网状C.关系D.面向对象2.E-R 图是在数据库设计中用来表示( A )的一种常用方法。
A .概念模型B .逻辑模型C.物理模型D.面向对象模型3.(C )是数据库中全体数据的逻辑结构和特征的描述,是所有用户的公共数据视图。
A .外模式B .内模式C.模式 D .概念模式4.(B )也称存储模式,是数据库物理结构和存储方式的描述,是数据在数据库内部的表示方式。
A .外模式B .内模式C.模式 D .概念模式5.数据库的概念模型独立于( A )。
A .具体的机器和DBMSB .E-R 图C.信息世界 D .现实世界6.在数据库中存储的是(C)。
A .数据B .数据库模型C.数据以及数据之间的联系D.信息7.规范化理论是关系数据库进行逻辑设计的理论依据,根据这个理论,关系数据库中的关系必须满足:其每一个属性都是(B )。
A .互不相关的B .不可分解的C.长度可变得D.互相关联的8.在数据模型中有“型”和“值(或实例)”两个对应的概念。
其中数据库的模式是一个( D )的概念,是一个相对()的概念,而数据库在某一时刻的状态则是一个()的概念,是一个相对()的概念。
A .型;变化;值;不变B .值;不变;型;变化C.值;变化;型;不变D.型;不变;值;变化9.关系表 A 的属性个数为5,元组个数为10;关系表 B 的属性个数为6,元组个数为20.则 A 与 B 的笛卡尔积A× B 的属性有( D )个,元组个数有()个。
A . 30;200B . 11; 30 C.30; 30 D. 11; 20010.父亲和子女的亲生关系属于(B )的关系。
A . 1: 1B .1: n C. m: n D.不一定11.在SQL 语言中,删除关系表中的一个属性列,要用动词( D ),删除关系表中的一行或多行元组,要用动词()。
数据库期中测试答案

一、单项选择题(本大题共15小题,每小题2分,共30分)1.两个实体间联系的是类型M:N ,则将其转化为关系时应( D )A.将M 方的码纳入N 方B.将N 方的码纳入M 方C.将M 方的码纳入N 方,同时将N 方的码纳入M 方D.另建一个关系,包括M 方和N 方的码以及联系上的所有属性2.在E-R 概念模型中,一个学生是实体,学生实体可由学号、姓名、性别等属性组成,那么性别的取值范围是实体的( D )A.主码B.属性C.联系D.域3.下列SQL 命令中,用于修改表结构的是( A )A.ALTERB.CREATEC.UPDATED.INSE4.在视图上不能..授予的操作权限是( B )A.INSERTB.INDEXC.DELETE5.设有关系WORK (ENO ,CNO ,PAY ),主码为(ENO ,CNO )。
按照实体完整性规则(D ) A .只有ENO 不能取空值 B .只有CNO 不能取空值C .只有PAY 不能取空值D .ENO 与CNO 都不能取空值6.关系R 和S 如下表R -S 的结果是( B)7.下面关于自然连接和等值连接的叙述中,不正确...的是( C )A .自然连接是一种特殊的等值连接B .自然连接要求在两个关系中有公共属性,而等值连接不必C.两种连接都可以只用笛卡尔积和选择运算导出D.自然连接要在结果中去掉重复的属性,而等值连接不必8.设有关系表S(NO,NAME,AGE),其中AGE为年龄字段,则表达式AGE NOT BETWEEN 18 AND 24 等价于( D )A.AGE<=18 OR AGE>=24 B.AGE<=18 OR AGE>24C.AGE<18 OR AGE>=24 D.AGE<18 OR AGE>249.下列关于视图的说法中错误..的是( C )A.视图是从一个或多个基本表导出的表,它是虚表B.视图可以被用来对无权用户屏蔽数据C.视图一经定义就可以和基本表一样被查询和更新D.视图可以用来定义新的视图二、填空题(本大题共10小题,每小题1分,共10分)请在每小题的空格上填上正确答案。
数据库期中考试

期中考试一、判断题用√和×表示对和错(每小题1分,共10分)√1.同一个关系模型的任两个元组值不能全同。
×2.模式/内模式为数据库提供了逻辑数据独立性。
√3.在关系代数运算中,从关系中取出满足条件的元组的运算称为选择运算。
√4.基本表是本身独立存在的表,在 SQL 中一个关系就对应一个基本表。
×5. 数据库系统的三级模式结构中,外模式、模式、内模式都只有一个。
√6.DB、DBMS、DBS三者之间的关系是DBS包括DB和DBMS。
×7. 概念模型是按计算机系统的观点对数据建模的。
×8. 数据存储结构改变时逻辑结构不变,相应的程序也不变,这是DBS的逻辑独立性。
√9. 在SQL中使用视图描述数据库的外模式。
√10.关系是域上笛卡儿积的子集。
二、填空题(每小题1分,共20分)11.DBMS缩写的含义是__________。
12.关系代数运算中,传统的集合运算有___________、并、交和差。
13.用SELECT进行模糊查询时,可以使用_________或________匹配符。
14.数据模型通常由:数据结构、数据操作和________ 三部分组成。
15.关系中主码的取值必须唯一且非空,这是由 ___________完整性规则决定的。
16.数据独立性是指数据的________ 和数据的逻辑独立性。
17. 结构的类型来命名,数据模型分为层次模型、网状模型、和____________。
18. 实体类型及实体间联系的模型称为________。
19.数据操作语言的特点是:操作对象与结果均为 ___________ 、操作的非过程性强、语言一体化、并且建立在数学理论基础之上。
20. 对于每一个外模式,数据库系统都有一个 _______________ 映象,它定义了该外模式与模式之间的对应关系。
21. 统计项目数的函数是:________。
22. 视图是一个虚表,它一经定义就可以和基本表一样被查询,但_________ 操作将有一定的限制。
数据库期中考试题

一、单项选择题(25小题,25分)1.数据库的概念模型独立于。
A.具体的机器和DBMS B.E-R图C.信息世界D.现实世界2. 是存储在计算机内有结构的数据的集合。
A.数据库系统B.数据库C.数据库管理系统D.数据结构3. 数据库中,数据的物理独立性是指。
A.数据库与数据库管理系统的相互独立B.用户程序与DBMS的相互独立C.用户的应用程序与存储在磁盘上数据库中的数据是相互独立的D.应用程序与数据库中数据的逻辑结构相互独立4、关系数据库管理系统应能实现的专门关系运算包括。
A.排序、索引、统计B.选择、投影、连接C.关联、更新、排序D.显示、打印、制表5、自然连接是构成新关系的有效方法。
一般情况下,当对关系R和S使用自然连接时,要求R和S含有一个或多个共有的。
A.元组B.行C.记录D.属性6、关系模式的任何属性。
A.不可再分B.可再分C.命名在该关系模式中可以不惟一D.以上都不是7、假定学生关系是S(S#,SNAME,SEX,AGE),课程关系是C(C#,CNAME,TEACHER),学生选课关系是SC(S#,C#,GRADE)。
要查找选修“COMPUTER”课程的“女”学生姓名,将涉及到关系。
A.S B.SC,C C.S,SC D.S,C,SC8、若用如下的SQL语句创建一个student表:CREATE TABLE student(NO C(4) NOT NULL,NAME C(8) NOT NULL,SEX C(2),AGE N(2))可以插入到student表中的是。
A.(‘1031’,‘曾华’,男,23) B.(‘1031’,‘曾华’,NULL,NULL) C.(NULL,‘曾华’,‘男’,‘23’) D.(‘1031’,NULL,‘男’,23)9、数据库为S-T, 检索所有比“王华”年龄大的学生姓名、年龄和性别。
正确的SELECT 语句是。
A.SELECT SNO,SAGE,SSEX FROM STUDENTWHERE SAGE>(SELECT SAGE FROM STUDENTWHERE SNO=“王华”)B.SELECT SNO,SAGE,SSEXFROM STUDENTWHERE SNO=“王华”C.SELECT SNO,SAGE,SSEX FROM STUDENTWHERE SAGE>(SELECT SAGEWHERE SNO=“王华”)D.SELECT SNO,SAGE,SSEX FROM STUDENTWHERE SAGE>王华.SAGE10、数据库如7题,检索选修课程“C2”的学生中成绩最高的学生的学号。
(附答案)数据库期中考试复习题目汇总上课讲义

《数据库概论》课程期中复习题目汇总一、为某百货公司设计一个E-R模型。
百货管辖若干个连锁商店,每家商店经营若干商品,每家商店有若干职工,但每个职工只能服务于一家商店。
实体类型“商店”的属性有:商店编号,店号,店址,店经理。
实体类型“商品”的属性有:商品编号,商品名,单价,产地。
实体类型“职工”的属性有:职工编号,职工名,性别,工资。
在联系中应反映出职工参加某商店工作的开始时间,商店销售商品的有销售量。
试画出反映商店、商品、职工实体类型及联系类型的ER图,并将其转换成关系模式集。
二、关系代数设有三个关系:S(S#,SNAME,AGE,SEX)SC(S#,C#,GRADE)C(C#,CNAME,TEACHER)说明:S#——学号SNAME——学生姓名AGE——年龄SEX——性别C#——课程号CNAME——课程名TEACHER——教师GRADE——成绩试用关系代数写出查询语句。
(1)检索LIU老师所授课程的课程号、课程名。
(2)检索年龄大于23岁的男学生的学号与姓名。
(3)检索学号为S3学生所学课程的课程名与任课教师名。
(4)检索至少选修LIU老师所授课程中一门课程的女学生的姓名。
(5)检索WANG同学不学的课程号。
(6)检索至少选修两门课程的学生学号。
(7)检索全部学生都选修的课程的课程号与学生学号。
(8)检索选修课程包含LIU老师所授课程的学生学号。
(用∞代表自然连接):(1)πC#,CNAME(σTEACHER='LIU'(C))(2)πS#,SNAME(σAGE>'23'∧SEX='男'(S))(3)πCNAME,TEACHER(σS#='S3'(SC∞C))(4)πSNAME(σSEX='女'∧TEACHER='LIU'(S∞SC∞C))(5)πC#(C)-πC#(σSNAME='WANG'(S∞SC))(6)πS#(σ1=4∧2≠5(SC×SC)) (SC自乘之后,同一个学号下两个课程号不同的元组)(7)πC#,S#(SC∞(πS#,C#(SC)÷πS#(S))))(8)πS#(σTEACHER='LIU'(S∞SC∞C))三、SQL语句(1)1、建立一个数据库和五张表的表结构。
数据库期中试题及答案

数据库期中试题及答案苏州科技学院数据库原理与设计试卷一、单选题(1*20=20分)1、DBMS 是DA.数据库B.操作系统C.数据库系统D.数据库管理系统2、下述哪一条不在DBA(数据库管理员)职责范围内 D 。
A.监督和控制数据库的运行B.参与数据库及应用程序设计C.设计数据库的存储策略D.设计数据库管理系统DBMS3、模式的逻辑子集通常称为(C)A.存储模式B.内模式C.外模式D.模式4、用二维表结构表示实体以及实体间联系的数据模型称为BA 层次数据模型B 关系数据模型C 网状数据模型D 树状数据模型5、下列哪一条不属于概念模型的特点D。
A.对现实世界的真实反映B.易于交流和理解C.易于变动D.在计算机实现效率高6、表之间一对多关系是指_B_____。
A.一张表与多张表之间的关系B.一张表中的一个记录对应另一张表中的多个记录C.一张表中的一个记录对应多张表中的一个记录D.一张表中的一个记录对应多张表中的多个记录7、一辆汽车由多个零部件组成,且相同的零部件可适用于不同型号的汽车,则汽车实体集与零部件实体集之间的联系是( D )A. 1:1B. 1:MC. M:1D. M:N8、设计数据库时首先应该设计 C 。
A.数据库应用系统结构B.DBMS结构C.数据库的概念结构D.数据库的控制结构9、概念设计的主要目标是产生数据库概念结构,该结构主要反映(D )A.DBA管理信息的需求B.数据库的维护需求C.应用程序开发的需求D.企业的信息需求10、设属性A是关系R的主属性,则属性A不能取空值,这是 AA.实体完整性规则B.参照完整性规则C.用户自定义完整性规则D.表完整性规则11、设关系R和S分别有m和n个元组,则R×S的元组个数是(D)A.m B.n C.m+n D.m×n12、下面不是SQL语言优点的是(D )A.语言简练,易学易用B.高度非过程化C.数据独立性好D.能方便地生成报表13、.取出关系中的某些列,并消去重复的元组的关系运算称为( B )。
数据库期中测验试题参考答案

1.答:关系模型的三个组成部分为关系结构、关系操作和关系完整性约束。
在关系模型中,无论是实体集,还是实体集之间的联系均由单一的关系表示。
关系模式可以形式化地表示为:R(U,D,Dom,F),其中R为关系名,U为组成该关系的属性集合,D为属性组U中属性所来自的域,Dom为属性向域的映像的集合,F为属性间数据的依赖关系集合。
关系操作语言包括关系代数、关系演算和基于映像的语言。
关系操作语言灵活方便.表达能力和功能都非常强大。
其主要特点是:关系操作语言操作一体化;关系操作的方式是一次一集合方式;关系操作语言是高度非过程化的语言。
关系模型中有三类完整性约束:实体完整性、参照完整性和用户定义的完整性。
2 答:关系操作语言灵活方便,表达能力和功能都非常强大,其主要特点是:关系操作语言操作一体化;关系操作的方式是一次一集合方式;关系操作语言是高度非过程化的语言。
关系操作语言包括关系代数、关系演算和基于映像的语言。
关系代数语言是用对关系的运算来表达查询要求的语言。
关系演算语言是用查询得到的元组应满足的谓词条件来表达查询要求的语言。
基于映像的语言是具有关系代数和关系演算双重特点的语言。
3.答:1)若关系中的某一属性组(或单个属性)的值能惟一标识一个元组,则称该属性组(或属性)为候选码。
当一个关系有多个候选码时,应选定其中的一个候选码为主码;而如果关系中只有一个候选码,这个惟一的候选码就是主码。
设F是基本关系R的一个或一组属性,但不是关系R的主码(或候选码)。
如果F与基本关系s的主码KS相对应,则称厅是基本关系R的外码。
2)给定一组域D1,D2,…,Dn.这些域中可以有相同的部分,则D1,D2,…,Dn 的笛卡地积为:D1×D2×…×Dn﹦{(dl,d2,…,dn)∣di∈Di,i=1,2,…,n}。
D1×D2×…×Dn的子集称作在域D1,D2,…,Dn上的关系,表示为:R(D1,D2,…,Dn)。
2023-2024下《MySQL数据库技术及应用》期中试卷(带答案)

2023—2024下 2204班《MySQL数据库技术及应用》期中试卷一、单选题(2分*30=60分)1. select * from student 该代码中的* 号,表示的正确含义是( C )A. 普通的字符*号B. 错误信息C. 所有的字段名D. 模糊查询2. 数据库简称什么?( A )A.DBB.DBSC.DBMSD.DBA3. 数据库管理系统简称什么?( C )A.DBB.DBSC.DBMSD.DBA4. MySQL是哪种数据模型的数据库管理系统?( C )A.层次模型B.网状模型C.关系模型D.对象模型5. 下列描述正确的是( B )A. 一个数据库只包含一个数据表B. 一个数据库可以包含多个数据表C. 一个数据库只包含两个数据表D. 一个数据表可以包含多个数据库6. Mysql支持的数据类型,主要分成(C)类A. 1B. 2C. 3 D 47. 显示当前存在的数据库,正确的是(C)A. show databaseB. use databaseC. show databasesD. select database8. Create database mydb该代码的功能是(B)A. 创建表MYDBB. 创建数据库MYDBC. 修改数据库MYDBD. 删除数据库MYDB9. drop database MyDB001 该代码的功能是( B)A. 修改数据库名为MyDB001B. 删除数据库MyDB001C. 使用数据库MyDB001D. 创建数据库MyDB001 10. 下列(B)类型不是MySQL中常用的数据类型。
A.INT B. VAR C. TIME D. CHAR11. 36属于( C )A. 字符串型B. 浮点型C. 数字类型D. 日期和时间类型12. “abc”属于(A)A. 字符串型B. 整型C. 数字类型D. 日期和时间类型13. 删除字段正确的语句是(C)A. alter table ….. modify …….B. alter table ….. change …….C. alter table ….. drop …….D. alter table ….. add …….14. 查看数据库中数据表列表的命令是(B)A. show table;B. show tables;C. show databases;D. show database;15. 假设一个书店用(书名书号作者出版社出版日期库存数量……)一组属性来描述图书,可以作为“关键字”的是( A )A. 书号B. 书名C. 作者D. 出版社16. Sql语句中修改表结构的命令是(C)A. MODIFY TABLEB. MODIFY STRUCTUREC. ALTER TABLED. ALTER STRUCTURE17. 在create table 语句中,通常使用(D)关键字来指定主键。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Database System PrinciplesTest One(07401 — 07405)Class____________No____________Name____________1.Fill in blanks (1 x 7 points)(1)The collection of information stored in the database at a particular moment is called an _instance____of the database.(2)The database system provides users with three levels of data abstraction, the _view__ level of abstraction describes only part of the entire database.(3)Database design involves the following phases: requirements analysis,conceptual/external schema design, logical schema design and physical schema design.(4) Data model is a collection of conceptual tools for describing data, datarelationships, data semantics, and data constraints.(5) As human-machine interfaces, the database language consists of two parts, i.e the datadefinition language (DDL) and DML (data manipulation language) . (6)In the following figure, the participation constraints of A in R is partial , themapping cardinality form A to B is many-to-many(7) An entity set that does not have a primary key is referred to as a weak entity set .2.Choice (1 x 9 points)(1)For the entity set Student(#student, sname, department, course, grade), the primaryattributes are .A. #student, courseB.{#student}C. {#student, course}D. #studentE.#student F. course(2)With respect to the following relational database, is the data model,is the relational schema.A.R={ <a1, a2, …., a n> }B.<Smith, 0441112, CS, database, 90>C. Student(sname, #student, department, course, grade)(3)relationship set “服务于” among the entity sets cell and MS, primary_key(服务于) isA. either primary_key(MS) or primary_key(cell)B. primary_key(MS)C. primary_key(cell)D. primary_key(MS) ∪ primary_key(cell)For the descriptive attribute “业务类型” of the relationship set “服务于” among MS and cell, when reducing “服务于” into the relational table, how to deal with the attribute “业务类型”A. “业务类型” can only be assigned as the attribute of the table corresponding to MSB. “业务类型” can only be assigned as the attribute of the table corresponding to cellC. “业务类型” can only be assigned as the attribute of the table corresponding to 服务于(4)For a many-to-one relationship sets R that associates entity set A and B, if R ispartially on the many-side A and the one-side B, how to deal with R ?A.R should be represented as a independent table corresponding to RB.R should not be represented as a independent table, it can be reduced to the table Acorresponding to the many and total side entity set AC.R should not be represented as a independent table, it can be reduced to the table Bcorresponding to the one and part side entity set B(5)For the extended E-R model in Fig.3, if entity-set-L1 ∩ entity-set-L2=Φ, then thegeneralization/specialization isA. overlappingB. disjoint, and if (entity-set-L1 ∪entity-set-L2) ≠H-entity-set, then thegeneralization/specialization isA. totalB. partial(6)Given the cardinalities of the entity sets A and B with respect to therelationship set R, the participation constraints of A can be decided by ;A. l AB. h AC. l BD. h BThe mapping cardinality from A to B can be decided by .A. [l A, l B]B. [h A , h B]C. [h B , h A]D. [l A, h B]答案:A A C B A A B B A CReduce the E-R diagram in Fig.3 into relational schemas.3.(10 points)Answers :BTS(BTS-id, 发射功率);天线(BTS-id, 对应扇区, 型号,增益,方向角)4. (6 points) Convert the following E-R diagram into the diagram that containsonly binary relationshipsRBCAAttr-RAnswers :E = { e i } , | E |= | R |, i.e. each (a i , b i , c i ) in Rcorresponds to one ei in E, or E = { ei }=R={(a i , b i , c i ) } R a = { (e i , a i) | e i∈E , a i∈A }, relating E and AR b = { (e i , b i) | e i ∈E , b i ∈B } , relating E and BR c = { (e i , c i) | e i ∈E , c i ∈B }, relating E and CE has an identifying attribute e ( candidate key) todistinguish each e i i n Eall attributes of R, i.e. attr-R, are assigned to E5. (10 points)Convert the entity set “学生”, of which the attribute “老乡” is amultivalued attribute, in Fig.4 into relational tablesstudent-id籍贯老乡性别年龄男 20 07494 北京 07596,0761107498 河北 07320,女 1907321Fig.4Answers:student-id籍贯性别年龄07494 北京男 2007498 河北女 19student-id老乡07494 0759607494 0761107498 0732007498 073216.(15 points) 给出下列关系代数操作对应的SQL语句(1) σp(r) (2) ∏A1, A2, .., Am ( r )(3) r∞s ,, 假设r(A, B, C), s(C, E, F)(4) r ∩ s(5) loan ←loan∪σamount ≥ 0and amount ≤ 50 (loan)假设loan(loan-number, branch, amount) Answers:(1)select * from r where P(2)select A1, A2, .., Am from r(3)select * from r natual join sselect * from rwhere r.C =s.C(4)r intersect s(5)insert into loanselect * from loanwhere amount ≥ 0and amount ≤ 507.(9 points)给出下列SQL语句对应的关系代数表达式(1) select branch-name, max (salary)from pt-worksgroup by branch-name假设pt-works(employee-name, branch-name, salary) (2) delete form rwhere P(3) update loanset amount = amount *1.2where amount > 1000Answers:(1) branch_name G max(salary) (pt-works)(2) r ← r —σp(r)(3) T1 ← пloan-number, branch_name, amount*1.2σamount > 1000 (loan)T2 ←σamount≤ 1000 (loan)loan ← T1 ∪ T28. (14 points). Here is the schema diagram for the bank-customer database.Use SQL statements to implement the following operations:(1)Define the table account, it is assumed that the null value is inappropriate for theattribute branch_name and the attribute balance ranges from 5000 to 100,000.(3 points)(2)Find out the name of each customer who has accounts in only one branch. (5points)(3)Modify the structure of the table branch, add a new attribute account_amount into it,which describes the total number of accounts in a branch. And then assign thecorrect value of account_amount for each branch in the table branch.(6 points)Answers:(1)create table account{ account-number integer primay keybranch-name varchar not nullbalance integerforeign key (branch-name) reference branchcheck (balance between 5000 and 100000)}(2)select custom-namefrom account, depositorwhere aoount.account-number= depositor.account-numbergroup by customer-namehaving count(distinct branch-name)=1(3) step1.alter table branch add account-amount integerstep2.create view sum-amount as b-name, total{ select branch-name, count(*)from accountgroup by branch-name}step3. (MS SQL Server支持的语法)update branchset account-amount = sum-amount.totalfrom branch, sum-amountwhere branch.branch-name=sum-amount.b-name或:update branchset account-amount = sum-amount.totalfrom branch JOIN sum-amounton branch.branch-name=sum-amount.b-name或:(Oralce和DB2都支持的语法):update branchset account-amount =select sum-amount.totalfrom sum-amountwhere branch.branch-name=sum-amount.b-name另一种解法:step1.create view sum-amount as b-name, total{ select branch-name, count(*)from accountgroup by branch-name}Step2.create table new-branch{ branch-name varchar primay keybranch-city varchassets integeraccount-amount integer}Step3.insert into new-branchselect branch-name, branch-city, assets, totalfrom branch, sum-amountwhere branch.branch-name = sum-amount.b-name step4. drop branchstep5. 利用DBMS相关机制,将new-branch换名为branch或者:在new-branch上定义新视图branch9. (20 points) A school is going to arrange a sports day for the students. A database to keep track of participants and activities during the sports day is to be created. Consider the following information:(1). Participating persons. Each person has a number and a name. The person is identified by the number.(2). Teams. Each team has a number and a name. The team is identified by the number.(3). A team consists of several persons, and a person can be a member of several teams. A team must have at least one person, and a person may not participate in any team. (4). Activities, such as baseball or long jump. Each activity has a number, a name, and a starting time, and is identified by the number.(5). Participation in the activities. Both teams and individual persons can participate in more than one activities. Each person and each team must participate in at least one activity. Each activity can have many teams and many persons.(1) Design the E/R diagram for the database on the basis of the information mentioned above .( 15 points)Note: mapping cardinality of each relationship and participation of each entity to the relationship should be described in the diagram.(2) Convert the E-R diagram to the proper relational schemas, and give the primary keys of each relation schemas by underlines. (15 points)Answers:team(t_number, t_name)person(p_number, p_name)activity(a_number, a_name, a_time) member(t_number, p_number) participation1(t_number, a_number) participation2(p_number, a_number)。