Đang chuẩn bị liên kết để tải về tài liệu:
Lecture Database system concepts - Chapter 5: Other relational languages
Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG
Tải xuống
In this chapter we study two additional relational languages, QBE and Datalog. QBE, based on the domain relational calculus, forms the basis for query languages sup-ported by a large number of database systems designed for personal computers, such as Microsoft Access, FoxPro, etc. | Chapter 5: Other Relational Languages Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See www.dbbook.com for conditions on reuse Chapter 5: Other Relational Languages s Tuple Relational Calculus s Domain Relational Calculus s QuerybyExample (QBE) s Datalog Database System Concepts , 5th Ed., Aug 2005 5. ©Silberschatz, Korth and Sudarshan Tuple Relational Calculus s A nonprocedural query language, where each query is of the form {t | P (t ) } s It is the set of all tuples t such that predicate P is true for t s t is a tuple variable, t [A ] denotes the value of tuple t on attribute A s t ∈ r denotes that tuple t is in relation r s P is a formula similar to that of the predicate calculus Database System Concepts , 5th Ed., Aug 2005 5. ©Silberschatz, Korth and Sudarshan Predicate Calculus Formula 1. Set of attributes and constants 2. Set of comparison operators: (e.g., , ≥) 3. Set of connectives: and (∧), or (v)‚ not (¬) 4. Implication (⇒): x ⇒ y, if x if true, then y is true x ⇒ y ≡ ¬x v y 5. Set of quantifiers: ∃ t ∈ r (Q (t )) ≡ ”there exists” a tuple in t in relation r such that predicate Q (t ) is true ∀t ∈ r (Q (t )) ≡ Q is true “for all” tuples t in relation r Database System Concepts , 5th Ed., Aug 2005 5. ©Silberschatz, Korth and Sudarshan Banking Example s branch (branch_name, branch_city, assets ) s customer (customer_name, customer_street, customer_city ) s account (account_number, branch_name, balance ) s loan (loan_number, branch_name, amount ) s depositor (customer_name, account_number ) s .