Achieving the BCNF by Decomposition (2) Three possible decompositions for relation TEACH 1. {student, instructor} and {student, course} 2. {course, instructor } and {course, student} 3. {instructor, course } and {instructor, student} All three decompositions will lose fd1. We have to settle for sacrificing the functional dependency preser...
49 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1486 | Lượt tải: 0
Summary (continued) A database may be accessed via an interactive database Most often, however, data in a database is manipulate via application programs Several methods of database programming: – embedded SQL – dynamic SQL – stored procedure and function
45 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1258 | Lượt tải: 0
UPDATE Used to modify attribute values of one or more selected tuples A WHERE-clause selects the tuples to be modified An additional SET-clause specifies the attributes to be modified and their new values Each command modifies tuples in the same relation Referential integrity should be enforced
71 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1549 | Lượt tải: 0
Step 9: Mapping of Union Types (Categories). – For mapping a category whose defining superclass have different keys, it is customary to specify a new key attribute, called a surrogate key, when creating a relation to correspond to the category. – In the example below we can create a relation OWNER to correspond to the OWNER category and incl...
32 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1357 | Lượt tải: 0
QBE Examples Specifying complex cinditions in QBE: A technique called the “condition box” is used in QBE to state more involved Boolean expressions as conditions. The D.4(a) gives employees who work on either project 1 or 2, whereas the query in D.4(b) gives those who work on both the projects.
53 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1626 | Lượt tải: 0
In-Class Exercise (Taken from Exercise 5.15) Consider the following relations for a database that keeps track of student enrollment in courses and the books adopted for each course: STUDENT(SSN, Name, Major, Bdate) COURSE(Course#, Cname, Dept) ENROLL(SSN, Course#, Quarter, Grade) BOOK_ADOPTION(Course#, Quarter, Book_ISBN) TEXT(Book_ISBN, B...
29 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1628 | Lượt tải: 1
Summary of Modeling Concepts ABSTRACTIONS CLASSIFICATION AGGREGATION (COMPOSITION AND ASSOCIATION) IDENTIFICATION GENERALIZATION AND SPECIALIZATION CONSTRAINTS CARDINALITY (Min. and Max) PARTICIPATION COVERAGE (Total vs. Partial, Exclusive vs. Overlapping)
29 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1391 | Lượt tải: 0
Formal Definitions of EER Model (2) Subclass S of C is predicate defined if predicate p on attributes of C is used to specify membership in S; that is, S = C[p], where C[p] is the set of entities in C that satisfy p A subclass not defined by a predicate is called user-defined Attribute-defined specialization: if a predicate A = ci (where...
22 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1653 | Lượt tải: 0
Extended Entity-Relationship (EER) Model Incorporates Set-subset relationships Incorporates Specialization/Generalization Hierarchies NEXT CHAPTER ILLUSTRATES HOW THE ER MODEL CAN BE EXTENDED WITH - Set-subset relationships and Specialization/Generalization Hierarchies and how to display them in EER diagrams
38 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1547 | Lượt tải: 1
Classification of DBMSs Distributed Database Systems have now come to be known as client server based database systems because they do not support a totally distributed environment, but rather a set of database servers supporting a set of clients
33 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1663 | Lượt tải: 0