- 2
- 0
- 约3.78千字
- 约 5页
- 2016-08-27 发布于重庆
- 举报
数据库系统概论,第二章,赵娜
第2章 习题答案
1.请为计算机经销商设计一个数据库,要求包括生产厂商和产品的信息。生产厂商的信息包括名称、地址、电话等;产品的信息包括生产商、品牌、型号、配置、进价等。使用ODL描述这个数据库,注意要为所有的属性和联系选择适当的类型,并且指出每个类的键码。
答:ODL的表示如下:
interface Factor(key Fname){ //生产厂商
attribute string Fname;
attribute string Faddress;
attribute integer Fphone;
relationship SetProduce produces
inverse Produce::factors;
}
interface Produce(key(Fname,type)){ //产品
attribute string Fname;
attribute string brand;
attribute string type;
attribute string configure;
attribute double price;
relationship Factor factors
inverse Factor::produces;
}
2.将习题1的数据库用E/R图来描述。
答:
3.假设习题1的数据库加入顾客的信息,包括姓名、
原创力文档

文档评论(0)