文档介绍:数据库系统基础教程第二章答案
数据库系统基础教程第二章答案
数据库系统基础教程第二章答案
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