ImageVerifierCode 换一换
格式:DOCX , 页数:23 ,大小:189.02KB ,
资源ID:1677017      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/1677017.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(完整版数据库系统基础教程第二章答案.docx)为本站会员(b****1)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

完整版数据库系统基础教程第二章答案.docx

1、完整版数据库系统基础教程第二章答案Exercise 2.2.1aFor relation Accounts, the attributes are:acctNo, type, balanceFor relation Customers, the attributes are:firstName, lastName, idNo, accountExercise 2.2.1bFor relation Accounts, the tuples are:(12345, savings, 12000),(23456, checking, 1000),(34567, savings, 25)For rel

2、ation Customers, the tuples are:(Robbie, Banks, 901-222, 12345),(Lena, Hand, 805-333, 12345),(Lena, Hand, 805-333, 23456)Exercise 2.2.1cFor relation Accounts and the first tuple, the components are:123456 acctNosavings type12000 balanceFor relation Customers and the first tuple, the components are:R

3、obbie firstNameBanks lastName901-222 idNo12345 accountExercise 2.2.1dFor relation Accounts, a relation schema is:Accounts(acctNo, type, balance)For relation Customers, a relation schema is:Customers(firstName, lastName, idNo, account)Exercise 2.2.1eAn example database schema is:Accounts (acctNo,type

4、, balance)Customers (firstName,lastName,idNo, account)Exercise 2.2.1fA suitable domain for each attribute:acctNo Integertype Stringbalance Integer firstName String lastName StringidNo String (because there is a hyphen we cannot use Integer) account IntegerExercise 2.2.1gAnother equivalent way to pre

5、sent the Account relation:acctNobalancetype34567P25-savings23456p 1000checking1234512000savingsAnother equivalent way to present the Customers relation:idNofirstNamelastNameaccount805-333LenaHand23456805-333LenaHand12345901-222RobbieBanks12345Exercise 2.2.2Examples of attributes that are created for

6、 primarily serving as keys in a relation:Universal Product Code (UPC) used widely in United States and Canada to track products in stores.Serial Numbers on a wide variety of products to allow the manufacturer to individually track each product.Vehicle Identification Numbers (VIN), a unique serial nu

7、mber used by the automotive industry to identify vehicles.Exercise 2.2.3aWe can order the three tuples in any of 3! = 6 ways. Also, the columns can be ordered in any of 3! = 6 ways. Thus, the number of presentations is 6*6 = 36.Exercise 2.2.3bWe can order the three tuples in any of 5! = 120 ways. Al

8、so, the columns can be ordered in any of 4! = 24 ways. Thus, the number of presentations is 120*24 = 2880Exercise 2.2.3cWe can order the three tuples in any of m! ways. Also, the columns can be ordered in any of n! ways. Thus, the number of presentations is n!m!Exercise 2.3.1aCREATE TABLE Product (m

9、aker CHAR(30),model CHAR(10) PRIMARY KEY,type CHAR(15);Exercise 2.3.1bCREATE TABLE PC (model CHAR(30),speed DECIMAL(4,2),ram INTEGER,hd INTEGER,price DECIMAL(7,2);Exercise 2.3.1cCREATE TABLE Laptop (model CHAR(30),speed DECIMAL(4,2),ram INTEGER,hd INTEGER,scree n DECIMAL(3,1),price DECIMAL(7,2);Exer

10、cise 2.3.1dCREATE TABLE Pri nter (model CHAR(30), color BOOLEAN, type CHAR (10), price DECIMAL(7,2);Exercise 2.3.1eALTER TABLE Prin ter DROP color;Exercise 2.3.1fALTER TABLE Laptop ADD od CHAR (10) DEFAULT noneExercise 2.3.2aCREATE TABLE Classes (class CHAR(20), type CHAR(5), cou ntry CHAR(20), n um

11、Gu ns INTEGER, bore DECIMAL(3,1), displaceme nt INTEGER);Exercise 2.3.2bCREATE TABLE Ships (n ame CHAR(30),class CHAR(20), lau nched INTEGER);Exercise 2.3.2cCREATE TABLE Battles (name CHAR(30),date DATE);Exercise 2.3.2dCREATE TABLE Outcomes (ship CHAR(30), battle CHAR(30), result CHAR(10);Exercise 2

12、.3.2eALTER TABLE Classes DROP bore;Exercise 2.3.2fALTER TABLE Ships ADD yard CHAR(30);Exercise 2.4.1aR1 := spfeed 3妒C)R2 := nwdei(RI)R1 := h 10(Laptop)R2 := Product汇丨(R1)R3 := nmaker (R2)Exercise 2.4.1cR1 := maker=B (Product 1 PC)R2 := maker=B (Product 1 Laptop)R3 := maker=B (Product 匚:.Printer)R4 :

13、= nd ,price (R1R5 := nd ,price (R2R6:= mSde price (R3R7 := R4 R5、丿 R6modelprice100464910056301006104920071429Exercise 2.4.1dR1 := color = true AND type = laser (Printer) R2 := ndel (R1) model30033007-Exercise 2.4.1eR1 := type=iaptop (Product)R2 := type=Pc (Product)R3 := mnker(R1)R4 := nmaker(R2)R5 :

14、= R3 -R4makerFGExercise 2.4.1fR1 := pCi(PC)R2 := PC2(PC)R3 := R1 匸:二 I (PCI.hd = PC2.hd AND PCI.model PC2.model) R2R4 := hd(R3)Exercise 2.4.1gR1 := pci(PC)R2 := pc2(PC)R3 := R1 - (PCI.speed = PC2.speed AND PCI.ram = PC2.ram AND PCI.model 2. 8PC) nnker,model Product)p(maker2,model2) (R2)R3Exercise 2.4.1kExercise 2.4.2aTtnodelPCR4 := R2 ,- (maker = maker? AND model model2)R5 := nker(R4)makerBEExercise 2.4.1iR1=rrndel,speed(PC)R2=rndel,speed(Laptop)R3=R1 U R2R4= P(model2,speed2) (R3)R5= mndel,speed (R3 (s

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1