Review
1、数据库设计过程可分为以下6步:需求分析、概念设计、逻辑设计、模式细化、物理设计、安全设计
2、ER图模型中,真实世界的物体用entity(实体)表示。实体集是结构相同的实体的集合。每一个实体集都有一组attribute(属性),称为key(键),可用于唯一标识每个实体。
3、两个或以上的实体间的联系称为relationship(关系)。关系集是来自相同实体集的实体的联系的集合。关系也可以有attribute(属性)。
4、实体集S和关系集间的key constraint(键约束)通过要求每个S中的实体只能参与最多一个关系,限制了关系的instances(实例)。
5、ER图的开发涉及重要的建模策略。要决定是使用属性还是实体集,实体还是关系集,二元还是三元关系还是聚合,必须要对建模的问题有透彻的了解。
6、对于大型企业来说,概念设计是特别具有挑战性的,因为涉及到被许多组管理的不同来源的数据。
EXERCISES
Exercise 2.1 Explain the following terms briefly:
attribute(属性):a property or description of an entity。
domain(域):a set of possible values for an attribute。
entity(实体):an object in the real world that is distinguishable from other objects such as the green dragon toy。
relationship(关系):an association among two or more entities。
entity set(实体集):a collection of similar entities such as all of the toys in the toy department。
relationship set(关系集):a collection of similar relationships。
one-to-many relationship(一对多关系):a key constraint that indicates that one entity can be associated with many of another entity。
many-to-many relationship(多对多关系):a key constraint that indicates that many of one entity can be associated with many of another entity。
participation constraint(参与约束):a participation constraint determines whether relationships must involve certain entities。
overlap constraint(重叠约束):决定是否允许两个子类包含同一实体
covering constraint(覆盖约束):决定父类是否完全包含在子类集中
weak entity set(弱实体):an entity that can not be identified uniquely without considering some primary key attributes of another identifying owner entity。
aggregation(聚合):a feature of the entity relationship model that allows a relationship set to participate in another relationship set。
role indicator(角色指示器):If an entity set plays more than one role,role indicators describe the different purpose in the relationship。
Exercise 2.2 A university database contains information about professors (identified by social security number, or SSN) and courses (identified by courseid). Professors teach courses;each of the following situations concerns the Teaches relationship set. For each situation,draw an ER diagram that describes it (assuming that no further constraints hold).
1.can teach the same course in several semesters, and each offering must be recorded.
2. Professors can teach the same course in several semesters, and only the most recent such offering needs to be recorded. (Assume this condition applies in all subsequent questions.)