1 / 25
文档名称:

数据库系统基础教程第二章答案.doc

格式:doc   大小:1,311KB   页数:25页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

数据库系统基础教程第二章答案.doc

上传人:gooddoubi 2021/10/21 文件大小:1.28 MB

下载得到文件列表

数据库系统基础教程第二章答案.doc

文档介绍

文档介绍:数据库系统基础教程第二章答案
数据库系统基础教程第二章答案
数据库系统基础教程第二章答案
Exercise 2。
For relation Accounts, the attributes are:
acctNo, type, balance
For relation Customers, the attributes are:
firstName, lastName, idNo, account
Exercise 
For relation Accounts, the tuples are:
ﻩ(12345, savings, 12000),
ﻩ(23456, checking, 1000),
ﻩ(34567, savings, 25)
For relation Customers, the tuples are:
(Robbie, Banks, 901-222, 12345),
(Lena, Hand, 805-333, 12345),
(Lena, Hand, 805—333, 23456)
Exercise 2.
For relation Accounts and the first tuple, the components are:
ﻩ123456 à acctNo
savings à type
12000 à balance
For relation Customers and the first tuple, the components are:
ﻩRobbie à firstName
ﻩBanks à lastName
ﻩ901-222 à idNo
ﻩ12345 à account
Exercise 2.2。1d
For 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。1e
数据库系统基础教程第二章答案
数据库系统基础教程第二章答案
数据库系统基础教程第二章答案
An example database schema is:
Accounts (
ﻩacctNo,
type,
balance

Customers (
ﻩfirstName,
ﻩlastName,
idNo,
account

Exercise
A suitable domain for each attribute:
acctNo à Integer
ﻩtype à String
balance à Integer
ﻩfirstName à String
ﻩlastName à String
ﻩidNo à String (because there is a hyphen we cannot use Integer)
ﻩaccount à Integer
Exercise
Another equivalent way to present the Account relation:
acctNo
balance
type
34567
25
savings
23456
1000
checking
12345
12000
savings
Another equivalent way to present the Customers relation:
idNo
firstName
lastName
account
805—333
Lena
Hand
23456
805-333
Lena
Hand
12345
901-222
Robbie
Banks
12345
Exercise 2。2。2
数据库系统基础教程第二章答案
数据库系统基础教程第二章答案
数据库系统基础教程第二章答案
Examples of attributes that are created for primarily serving as keys in a relation:
Universal Product Code (UPC) use