This preview shows pages 1–7. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Database System Concepts, 5 th Ed. Silberschatz, Korth and Sudarshan See www.dbbook.com for conditions on reuse Chapter 2: Relational Model Chapter 2: Relational Model Silberschatz, Korth and Sudarshan 2.<number> Database System Concepts  5 th Edition, June 15, 2005 Chapter 2: Relational Model Chapter 2: Relational Model Structure of Relational Databases Fundamental RelationalAlgebraOperations Additional RelationalAlgebraOperations Extended RelationalAlgebraOperations Null Values Modification of the Database Silberschatz, Korth and Sudarshan 2.<number> Database System Concepts  5 th Edition, June 15, 2005 Example of a Relation Example of a Relation Silberschatz, Korth and Sudarshan 2.<number> Database System Concepts  5 th Edition, June 15, 2005 Basic Structure Basic Structure Formally, given sets D 1 , D 2 , . D n a relation r is a subset of D 1 x D 2 x x D n Thus, a relation is a set of ntuples ( a 1 , a 2 , , a n ) where each a i D i Example: If customer_name = {Jones, Smith, Curry, Lindsay, } /* Set of all customer names */ customer_street = {Main, North, Park, } /* set of all street names*/ 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 Silberschatz, Korth and Sudarshan 2.<number> Database System Concepts  5 th Edition, June 15, 2005 Attribute Types Attribute Types Each attribute of a relation has a name The set of allowed values for each attribute is called the domain of the attribute Attribute values are (normally) required to be atomic ; that is, indivisible E.g. the value of an attribute can be an account number, but cannot be a set of account numbers Domain is said to be atomic if all its members are atomic The special value null is a member of every domain The null value causes complications in the definition of many operations We shall ignore the effect of null values in our main presentation and consider their effect later Silberschatz, Korth and Sudarshan 2.<number> Database System Concepts  5 th Edition, June 15, 2005 Relation Schema Relation Schema A 1 , A 2 , , A n are attributes R = ( A 1 , A 2 , , A n ) is a relation schema Example:...
View
Full
Document
This note was uploaded on 04/28/2010 for the course CSE cse123 taught by Professor Benny during the Spring '10 term at LSU Eunice.
 Spring '10
 benny

Click to edit the document details