上海交通大学 数据库原理 陆朝俊 复习
更新时间:2023-09-21 17:39:01 阅读量: 工程科技 文档下载
- 上海交通大学推荐度:
- 相关推荐
ER
b a c R F E d isa e G S H h f g If we translate this diagram to relations in the normal way for E/R diagrams described in the textbook, which relation schema would not be in the resulting database schema? (A) E(a,c,b) (B) S(a,c,f,g) (C) F(c,d) (D) R(a,c)
If we instead used the “object-oriented” approach to translating this E/R diagram to relations, how many relation schema would be different (when compared to the E/R-to-relations translation), either in their schema, or their set of tuples, or both? (A) 1 (B) 2 (C) 3 (D) 4
1 of 9
Convert the following E/R diagram (with details omitted) to a relational database schema using the object-oriented method. How many relation schemas will be produced? (Assume that each entity set has its own special attributes.)
A isa B isa D
(A) 1
isa C
(B) 4
(C) 5 2 of 9
(D) 6
Relational Theory
Given a relation R(A,B,C,D,E) and FDs AB?CE, B?D, and D?E, which of the following FD’s can not be inferred? (A) AD?CE (B) BC?D (C) AB?A (D) B?E
Given a relation R(A,B,C,D) with FD: A?BC, which of the following MVD’s can not be inferred? (A) A??BC (B) A??B (C) A??BD
(D) None of the above.
Suppose we have a relation R(A,B,C,D,E) and the FD’s A?DE, D?B, and E?C. If we project R (and therefore its FD’s) onto schema S(A,B,C), what is true about the key(s) for S? (A) Only ABC is a key (B) Only A is a key (C) Only DE is a key
(D) A, B, and C are each keys
Suppose we are given a relation schema R(A,B,C,D,E) with functional dependencies A?B, BC?D and E?C. If we project R onto S(B,C,D,E), which of the following functional
dependencies holds in S and is not a BCNF violation for S? (A) BC?D (B) BE?D (C) B?E (D) E?C
Suppose that R(A,B,C,D) satisfies MVD:A??B and it is known that R has tuples (a1,b1,c1,d1), (a1,b2,c2,d2), and (a2,b1,c1,d2). How many tuples must R have at least? (A) 3 (B) 4 (C) 5 (D) 6
3 of 9
Relational algebra and Datalog
In the following question, assume R and S are bags, and the operators are bag operators. Q1: (R∪ S) – (R∩S) Q2: (S–R) ∪ (R–S)
(A) Q1 and Q2 produce the same answer.
(B) The answer to Q1 is always contained in the answer to Q2. (C) The answer to Q2 is always contained in the answer to Q1. (D) Q1 and Q2 produce different answers.
Given relations P(A,B,C) and Q(C,D), which of the following relational algebra expressions is equivalent to this Datalog rule:
Answer(x,w) ? P(x,y,z) AND Q(y,w) AND x (A) ?P.A,Q.D(?P.A (D) ?P.A,Q.D(?P.A 4 of 9 SQL Q1: SELECT DISTINCT a FROM R WHERE b > 10; Q2: SELECT a FROM R WHERE b > 10 GROUP BY a; (A) Q1 and Q2 produce the same answer. (B) The answer to Q1 is always contained in the answer to Q2. (C) The answer to Q2 is always contained in the answer to Q1. (D) Q1 and Q2 produce different answers. Consider the following two SQL queries on relations R(a,b) and S(c): Q1: SELECT a FROM R WHERE b > ALL (SELECT c FROM S); Q2: SELECT a FROM R WHERE b > ANY (SELECT c FROM S); (A) Q1 and Q2 always produce the same answer. (B) The answer to Q1 is always contained in the answer to Q2. (C) The answer to Q2 is always contained in the answer to Q1. (D) None of the above. Given R(A,B)={('a',10),('b',20),('c',30)}, and execute the following three statements. What is the result of the last statement? create view V as select A from R where B>10; insert into V values('d'); select count(*) from V; (A) 1 (B) 2 (C) 3 (D) 4 5 of 9
正在阅读:
上海交通大学 数据库原理 陆朝俊 复习09-21
宫锁珠帘经典读后感10篇12-12
鼻腔给药系统药用辅料研究进展05-18
四川省事业单位招聘考试题2009真题及答03-24
高考英语易错动词总结04-18
2010年辽宁专升本考试真题-C语言部分03-16
2016年临床医疗服务行业现状及发展趋势分析(目录)06-23
环境工程原理习题集060813-完整答案07-09
对QMS_EMS_OHSMS三个管理体系认证与整合的探讨_王新05-21
学业不良的诊断与防止 - 图文04-02
- 关于实施“国培计划(2012)”项目的通知 - 图文
- 从我做起,为建设社会主义法治国家添砖加瓦
- 相图习题
- Excel练习 公式与函数
- 玻璃行业经营风险分析报告 - 图文
- 植物化学 - 习题答案
- 06年液压液力气动密封
- 《市场营销学通论》教材课后复习题全部答案
- 生物化学实验练习题
- 2010年外贸跟单操作实务答案
- 浦东新区环境保护和市容卫生管理局组织结构
- 2011年中小学校舍安全工程实施方案
- 机车总体及走行部课程教学大纲
- 论传统文化对行政管理的影响- 二稿
- 专业技术人员职业幸福感的提升答案
- 钳工工艺学试题
- 河南省濮阳市南乐县西邵中学九年级数学上册《中心对称图形》教案 新人教版
- 哈工大2008工程流体力学试卷(B)
- 非机动地下车库设计要求
- 冯婷:通向“恶的平庸性”之路