Tổng hợp tài liệu, ebook Cơ Sở Dữ Liệu tham khảo.
Semantic Query Optimization: Uses constraints specified on the database schema in order to modify one query into another query that is more efficient to execute. Consider the following SQL query, SELECT E.LNAME, M.LNAME FROM EMPLOYEE E M WHERE E.SUPERSSN=M.SSN AND E.SALARY>M.SALARY Explanation: Suppose that we had a constraint on the da...
28 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1040 | Lượt tải: 0
Indexes on Multiple Keys Ordered Index on Multiple Attributes Create a index on a search key field that is a combination of multiple attributes A lexicographic ordering of these tuple values establishes an order on this composite search key Partitioned Hashing For a key consisting of n components, the hash function is designed to produce a res...
37 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1555 | Lượt tải: 0
BCNF (Boyce-Codd Normal Form) A relation schema R is in Boyce-Codd Normal Form (BCNF) if whenever an FD X -> A holds in R, then X is a superkey of R Each normal form is strictly stronger than the previous one Every 2NF relation is in 1NF Every 3NF relation is in 2NF Every BCNF relation is in 3NF There exist relations that are in 3NF but not ...
24 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1260 | Lượt tải: 0
Minimal Sets of FDs (2) Every set of FDs has an equivalent minimal set There can be several equivalent minimal sets There is no simple algorithm for computing a minimal set of FDs that is equivalent to a set F of FDs To synthesize a set of relations, we assume that we start with a set of dependencies that is a minimal set (e.g., see algorithms ...
33 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1048 | 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 include any ...
31 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1099 | 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 A is a...
55 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1460 | Lượt tải: 0
The Domain Relational Calculus Another variation of relational calculus called the domain relational calculus, or simply, domain calculus is equivalent to tuple calculus and to relational algebra. The language called QBE (Query-By-Example) that is related to domain calculus was developed almost concurrently to SQL at IBM Research, Yorktown Heigh...
47 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 987 | 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
76 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1848 | Lượt tải: 0
Classification of DBMSs Based on the data model used: Traditional: Relational, Network, Hierarchical. Emerging: Object-oriented, Object-relational. Other classifications: Single-user (typically used with micro- computers) vs. multi-user (most DBMSs). Centralized (uses a single computer with one database) vs. distributed (uses multiple compute...
33 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 988 | Lượt tải: 0
Cost-estimation-based optimization If the cost of every execution plan can be estimated accurately, then the optimal plan can be eventually found. Two difficulties with cost-estimation based optimization: There may be too many possible execution plans to enumerate. It may be difficult to estimate the cost of each execution plan accurately. ...
70 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1086 | Lượt tải: 1