# ch2 - Database System Concepts 5 th Ed ©Silberschatz Korth...

This preview shows pages 1–8. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Database System Concepts, 5 th Ed. ©Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-use Chapter 2: Relational Model Chapter 2: Relational Model ©Silberschatz, Korth and Sudarshan 2.2 Database System Concepts - 5 th Edition, Oct 5, 2006 Chapter 2: Relational Model Chapter 2: Relational Model ■ Structure of Relational Databases ■ Fundamental Relational-Algebra-Operations ■ Additional Relational-Algebra-Operations ■ Extended Relational-Algebra-Operations ■ Null Values ■ Modification of the Database ©Silberschatz, Korth and Sudarshan 2.3 Database System Concepts - 5 th Edition, Oct 5, 2006 Example of a Relation Example of a Relation ©Silberschatz, Korth and Sudarshan 2.4 Database System Concepts - 5 th Edition, Oct 5, 2006 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 n-tuples ( 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.5 Database System Concepts - 5 th Edition, Oct 5, 2006 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.6 Database System Concepts - 5 th Edition, Oct 5, 2006 Relation Schema Relation Schema ■ A 1 , A 2 , …, A n are attributes ■ R = ( A 1 , A 2 , …, A n ) is a relation schema Example: Customer_schema = ( customer_name, customer_street, customer_city ) ■ r ( R ) denotes a relation r on the relation schema R Example: customer (Customer_schema) ©Silberschatz, Korth and Sudarshan 2.7 Database System Concepts - 5 th Edition, Oct 5, 2006 Relation Instance Relation Instance ■ The current values ( relation instance ) of a relation are specified by a table ■ An element t of r is a tuple , represented by a row in a table Jones Smith Curry Lindsay customer_name Main North North Park customer_street Harrison Rye Rye Pittsfield customer_city customer attributes (or columns) tuples (or rows) ©Silberschatz, Korth and Sudarshan...
View Full Document

## This note was uploaded on 02/17/2010 for the course CAS 6M03 taught by Professor Franek during the Spring '10 term at McMaster University.

### Page1 / 96

ch2 - Database System Concepts 5 th Ed ©Silberschatz Korth...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online