Database Systems: The Complete Book- P2

Database Systems: The Complete Book- P2: Database Systems and Database Design and Application courses offered at the junior, senior and graduate levels in Computer Science departments. Written by well-known computer scientists, this introduction to database systems offers a comprehensive approach, focusing on database design, database use, and implementation of database applications and database management systems | 76 CHAPTER 3. THE RELATIONAL DATA MODEL Figure An E R diagram about sister ships b Your answer to Exercise . c Your answer to Exercise a . d Your answer to Exercise b . Converting Subclass Structures to Relations When we have an isa-hierarchy of entity sets we are presented with several choices of strategy for conversion to relations. Recall we assume that There is a root entity set for the hierarchy This entity set has a key that serves to identify every entity represented by the hierarchy and A given entity may have components that belong to the entity sets of any subtree of the hierarchy as long as that subtree includes the root. The principal conversion strategies are 1. Follow the E R viewpoint. For each entity set E in the hierarchy create a relation that includes the key attributes from the root and any attributes belonging to E. 2. Treat entities as objects belonging to a single class. For each possible subtree including the root create one relation whose schema includes all the attributes of all the entity sets in the subtree. 3. Use null values. Create one relation with all the attributes of all the entity sets in the hierarchy. Each entity is represented by one tuple and that tuple has a null value for whatever attributes the entity does not have. We shall consider each approach in turn. . CONVERTING SUBCLASS STRUCTURES TO RELATIONS 77 E R-Style Conversion Our first approach is to create a relation for each entity set as usual. If the entity set E is not the root of the hierarchy then the relation for E will include the key attributes at the root to identify the entity represented by each tuple plus all the attributes of E. In addition if E is involved in a relationship then we use these key attributes to identify entities of E in the relation corresponding to that relationship. Note however that although we spoke of isa as a relationship it is unlike other relationships in that it connects components of a single entity

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.