《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)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 Database System Concepts-5th Edition,Oct 5,2006 2.2 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 2.2 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 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

Example of a Relation account_number branch_name balance A-101 Downtown 500 A-102 Perryridge 400 A-201 Brighton 900 A-215 Mianus 700 A-217 Brighton 750 A-222 Redwood 700 A-305 Round Hill 350 Database System Concepts-5th Edition,Oct 5,2006 23 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 2.3 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Example of a Relation

Basic Structure Formally,given sets D,D2,...D a relation ris a subset of D x D2 X ..X Dn Thus,a relation is a set of n-tuples(a,a2,...a)where each aie D 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 Database System Concepts-5th Edition,Oct 5,2006 2.4 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 2.4 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Basic Structure 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 n-tuples (a1 , a2 , …, an ) where each ai Di 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

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 Database System Concepts-5th Edition,Oct 5,2006 2.5 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 2.5 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 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

Relation Schema A1,A2,...,An are attributes R=(A1,A2,...,An)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) Database System Concepts-5th Edition,Oct 5,2006 2.6 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 2.6 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Relation Schema A1 , A2 , …, An are attributes R = (A1 , A2 , …, An ) 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)

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 attributes (or columns) customer name customer street customer_city Jones Main Harrison Smith North Rye tuples Curry North Rye (or rows) Lindsay Park Pittsfield customer Database System Concepts-5th Edition,Oct 5,2006 27 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 2.7 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 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)

Relations are Unordered Order of tuples is irrelevant(tuples may be stored in an arbitrary order) Example:account relation with unordered tuples account_number branch_name balance A-101 Downtown 500 A-215 Mianus 700 A-102 Perryridge 400 A-305 Round Hill 350 A-201 Brighton 900 A-222 Redwood 700 A-217 Brighton 750 Database System Concepts-5th Edition,Oct 5,2006 28 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 2.8 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Relations are Unordered Order of tuples is irrelevant (tuples may be stored in an arbitrary order) Example: account relation with unordered tuples

Database A database consists of multiple relations Information about an enterprise is broken up into parts,with each relation storing one part of the information account:stores information about accounts deposifor:stores information about which customer owns which account customer:stores information about customers Storing all information as a single relation such as bank(account number,balance,customer_name,..) results in repetition of information e.g.,if two customers own an account(What gets repeated?) the need for null values e.g.,to represent a customer without an account Normalization theory(Chapter 7)deals with how to design relational schemas Database System Concepts -5th Edition,Oct 5,2006 2.9 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 2.9 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Database A database consists of multiple relations Information about an enterprise is broken up into parts, with each relation storing one part of the information account : stores information about accounts depositor : stores information about which customer owns which account customer : stores information about customers Storing all information as a single relation such as bank(account_number, balance, customer_name, ..) results in repetition of information e.g.,if two customers own an account (What gets repeated?) the need for null values e.g., to represent a customer without an account Normalization theory (Chapter 7) deals with how to design relational schemas

The customer Relation customer_name customer_steet customer_city Adams Spring Pittsfield Brooks Senator Brooklyn Curry North Rye Glenn Sand Hill Woodside Green Walnut Stamford Hayes Main Harrison Johnson Alma Palo alto Jones Main Harrison Lindsay Park Pittsfield Smith North Rye Turner Putnam Stamford Williams Nassau Princeton Database System Concepts-5th Edition,Oct 5,2006 2.10 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 2.10 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 The customer Relation

The depositor Relation customer_name account_number Hayes A-102 Johnson A-101 Johnson A-201 Jones A-217 Lindsay A-222 Smith A-215 Turner A-305 Database System Concepts-5th Edition,Oct 5,2006 2.11 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 2.11 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 The depositor Relation
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 19 Information Retrieval.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 18 Data Analysis and Mining.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 17 Recovery System.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 16 Concurrency Control.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 15 Transactions.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 14 Query Optimization.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 13 Query Processing.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 12 Indexing and Hashing.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 11 Storage and File Structure.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 10 XML.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 1 Introduction(Avi Silberschatz Henry F. Korth S. Sudarshan).ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,附录,英文版)Appendix C Advanced Relational Database Design.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,附录,英文版)Chapter B Hierarchical Model.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,附录,英文版)Chapter A Network Model.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第六版,附录,英文版)Hierarchical Model.pdf
- 《数据库系统概念 Database System Concepts》原书教学资源(第六版,附录,英文版)Network Model.pdf
- 《数据库系统概念 Database System Concepts》原书教学资源(第六版,附录,英文版)Other Relational Query Languages.pdf
- 《数据库系统概念 Database System Concepts》原书教学资源(第六版,附录,英文版)Advanced Relational Database Design.pdf
- 《数据库系统概念 Database System Concepts》原书教学资源(第六版,PPT课件讲稿,英文版)Chapter 9 Application Design and Development.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第六版,PPT课件讲稿,英文版)Chapter 8 Relational Database Design.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 20 Database System Architectures.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 21 Parallel Databases.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 22 Distributed Databases.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 23 Advanced Application Development.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 24 Advanced Data Types.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter Advanced Transaction Processing.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 3 SQL.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 4 Advanced SQL.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 5 Other Relational Languages.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 6 Entity-Relationship Model.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 7 Relational Database Design.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 8 Application Design and Development.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 9 Object-Based Databases.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 01 Introduction(Avi Silberschatz Henry F. Korth S. Sudarshan).pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 10 Big Data.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 11 Data Analytics.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 12 Physical Storage Systems.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 13 Data Storage Structures.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 14 Indexing.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 15 Query Processing.pptx