Đang chuẩn bị liên kết để tải về tài liệu:
Lecture Database system concepts - Chapter 2: Relational model
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Chapter 2 presents the entity-relationship model. This model provides a high-level view of the issues in database design, and of the problems that we encounter in capturing the semantics of realistic applications within the constraints of a data model. | Chapter 2: Relational Model Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See www.dbbook.com for conditions on reuse Chapter 2: Relational Model s Structure of Relational Databases s Fundamental RelationalAlgebraOperations s Additional RelationalAlgebraOperations s Extended RelationalAlgebraOperations s Null Values s Modification of the Database Database System Concepts 5th Edition, June 15, 2005 2. ©Silberschatz, Korth and Sudarshan Example of a Relation Database System Concepts 5th Edition, June 15, 2005 2. ©Silberschatz, Korth and Sudarshan Basic Structure s Formally, given sets D1, D2, . Dn a relation r is a subset of D1 x D2 x x Dn Thus, a relation is a set of ntuples (a1, a2, , an) where each ai ∈ Di s Example: If q customer_name = {Jones, Smith, Curry, Lindsay, } /* Set of all customer names */ q customer_street = {Main, North, Park, } /* set of all street names*/ q customer_city = {Harrison, Rye, Pittsfield, } /* set of all city names */ Then r = { (Jones, Main, Harrison), (Smith, North, Rye), (Curry, North, Rye), (Lindsay, Park, Pittsfield) } is a relation over customer_name x customer_street x customer_city Database System Concepts 5th Edition, June 15, 2005 2. ©Silberschatz, Korth and Sudarshan Attribute Types s Each attribute of a relation has a name s The set of allowed values for each attribute is called the domain of the attribute s Attribute values are (normally) required to be atomic; that is, indivisible q E.g. the value of an attribute can be an account number, but cannot be a set of account numbers s Domain is said to be atomic if all its members are atomic s The special value null is a member of every domain s .