“ Possible representation (2) “

Slides:



Advertisements
Similar presentations
Database Languages Chapter 7. The Relational Algebra.
Advertisements

1 Welcome: To the fifth learning sequence “ Possible representation (2) “ Recap : In the previous learning sequence, we discussed four possible representations.
Unit 5 The Network Model  5.1 The Network Model  5.2 IDMS.
Fundamentals, Design, and Implementation, 9/e Appendix A Data Structures for Database Processing.
LEARNING OBJECTIVES Index files.
2010/3/81 Lecture 8 on Physical Database DBMS has a view of the database as a collection of stored records, and that view is supported by the file manager.
Lead Black Slide. © 2001 Business & Information Systems 2/e2 Chapter 7 Information System Data Management.
Database Systems Lecture # 8 11 th Feb,2011. The Relational Model of Data The term relation is basically just a mathematical term for a table. DBMS products.
CHP - 9 File Structures. INTRODUCTION In some of the previous chapters, we have discussed representations of and operations on data structures. These.
CS370 Spring 2007 CS 370 Database Systems Lecture 7 The Relational model.
Introduction –All information systems create, read, update and delete data. This data is stored in files and databases. Files are collections of similar.
Data Manipulation 11 After this lecture, you should be able to:  Understand the differences between SQL (Structured Query Language) and other programming.
1 California State University, Fullerton Chapter 7 Information System Data Management.
Logical Database Design ( 補 ) Unit 7 Logical Database Design ( 補 )
Chapter 7 Relational Algebra. Topics in this Chapter Closure Revisited The Original Algebra: Syntax and Semantics What is the Algebra For? Further Points.
Lead Black Slide Powered by DeSiaMore1. 2 Chapter 7 Information System Data Management.
1 Chapter 1 Introduction. 2 Introduction n Definition A database management system (DBMS) is a general-purpose software system that facilitates the process.
File Organization and Storage Structures Chapter 5.
Data Manipulation 21 After this lecture, you should be able to:  Use SQL SELECT statement effectively to retrieve the data from multiple related tables.
GIS Data Models GEOG 370 Christine Erlien, Instructor.
Index in Database Unit 12 Index in Database 大量資料存取方法之研究 Approaches to Access/Store Large Data 楊維邦 博士 國立東華大學 資訊管理系教授.
1 CSCE 520 Test 2 Info Indexing Modified from slides of Hector Garcia-Molina and Jeff Ullman.
1 Welcome: To the forth learning sequence “ Possible representation (1) “ Recap : In the previous learning sequence, we discussed the basic definitions.
Teanna Clarke 6aQ What is a Entity-Relationship Diagram?  An Entity-Relationship Diagram (ERD) is a tool that graphically shows the connections among.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. A database is a collection of information organized to provide efficient retrieval. The collected information.
Welcome: To the fifth learning sequence “ Data Models “ Recap : In the previous learning sequence, we discussed The Database concepts. Present learning:
Tree-Structured Indexes. Introduction As for any index, 3 alternatives for data entries k*: – Data record with key value k –  Choice is orthogonal to.
1 Chapter 8 The Discrete Fourier Transform (cont.)
Databases and DBMSs Todd S. Bacastow January
- The most common types of data models.
“ Possible representation (3) “
Indexing Structures for Files and Physical Database Design
CHP - 9 File Structures.
Indexing Goals: Store large files Support multiple search keys
IS 130 Information systems 1
Database Systems Chapter 3 1.
Chapter 11: File System Implementation
STRUCTURE OF PRESENTATION :
Chapter 11: File System Implementation
Tutorial 1 – Introduction To Microsoft Access 2003
Session 3 Welcome: To session 3 - the 7th. learning sequence
Chapter 11: File System Implementation
Tutorial 1 – Introduction To Microsoft Access 2003
(Slides by Hector Garcia-Molina,
Chapter 14 Normalization – Part I Pearson Education © 2009.
Indexing and Hashing Basic Concepts Ordered Indices
Unit 7 Normalization (表格正規化).
Chapter 11 Indexing And Hashing (1)
Database Design and Programming
Files Management – The interfacing
INDEXING.
Chapter 10 Counting Methods 2012 Pearson Education, Inc.
Session 3 Welcome: To session 3-the 8th. learning sequence
Chapter 10 Counting Methods.
Indexing 4/11/2019.
One-to-One and Onto, Inverse Functions
Data Structures & Algorithms
“ Possible representation (1) “
File Organization.
STRUCTURE OF PRESENTATION :
Chapter 11: File System Implementation
How to find the nth rule for a linear sequence
Question 1: Basic Concepts (40 %)
Question 1: Basic Concepts (45 %)
Unit 12 Index in Database 大量資料存取方法之研究 Approaches to Access/Store Large Data 楊維邦 博士 國立東華大學 資訊管理系教授.
Advance Database System
STRUCTURE OF PRESENTATION :
CHAPTER 69 NUMBER SYSTEMS AND CODES
Unit 12 Index in Database 大量資料存取方法之研究 Approaches to Access/Store Large Data 楊維邦 博士 國立東華大學 資訊管理系教授.
Information system analysis and design
Presentation transcript:

“ Possible representation (2) “ Welcome: To the fifth learning sequence “ Possible representation (2) “ Recap : In the previous learning sequence, we discussed four possible representations. Present learning: We shall explore the following topics: - The pointer chain. - The chain two-way. - The inverted organization.

Possible representation - In this section we make a simple collection of sample data and consider some of many ways it could be represented in storage at the level of stored record interface.

Possible representation The sample data is consists of information about the same five suppliers; for each supplier we wish to record the same attributes: Supplier number (S#), a supplier name (SNAME), and location (CITY).

Possible representation 5- An alternative to the previous representation (Combination Factoring out the city and Indexing on city) that avoids this problem is illustrated in fig5. The pointer chain.

Possible representation Athens . London . Paris . S1 Smith . S2 Jones S3 Black S4 Clark S5 Adams Fig 5: Pointer chain

Possible representation Athens . London . Paris . . S1 Smith . S2 Jones S3 Black S4 Clark S5 Adams Fig 5: Pointer chain

Possible representation Athens . London . Paris . . S1 Smith . S2 Jones S3 Black S4 Clark S5 Adams . Fig 5: Pointer chain

Possible representation Athens . London . Paris . . S1 Smith . S2 Jones S3 Black S4 Clark S5 Adams . Fig 5: Pointer chain

Possible representation Athens . London . Paris . . S1 Smith . S2 Jones S3 Black S4 Clark S5 Adams . Fig 5: Pointer chain

Possible representation Athens . London . Paris . . . . S1 Smith . S2 Jones S3 Black S4 Clark S5 Adams . Fig 5: Pointer chain

Possible representation Athens . London . Paris . . . . S1 Smith . S2 Jones S3 Black S4 Clark S5 Adams . Fig 5: Pointer chain

Possible representation Athens . London . Paris . . . . S1 Smith . S2 Jones S3 Black S4 Clark S5 Adams . Fig 5: Pointer chain

Possible representation Athens . London . Paris . . . . S1 Smith . S2 Jones S3 Black S4 Clark S5 Adams . Fig 5: Pointer chain

Possible representation In this representation each occurrence (CITY or supplier) contains just one pointer. Each City pointed to the first supplier in that city. That supplier then points to the second supplier record occurrence in the same city, who points to the third, and so on, up to the last, which points back to the city.

Possible representation Thus for each city we have chain of all supplier in that city. The advantage of this representation is that it is easier to apply change. The disadvantage is that, for a given city the only way to access the nth supplier is to follow the chain and access the 1st, 2nd,....,(n-1) the supplier too. If each access involves a seek operation, the time taken to access the nth supplier may be quite considerable.

Possible representation 6- Another extension to the above representation might be making the chain two-way (so that stored record contains exactly two pointers). The DBA might choose such a representation if deleting a supplier record is a common operation.

Possible representation Fig5 (pointer chain) is a simple example of multilist organization when for each city we had a list of corresponding suppliers. In exactly the same way we could also have a list of suppliers for each distinct status value. In general a multilist organization can clearly contain any number of such lists.

Possible representation 7- To return to secondly indexing: just as it is possible to provide any number of lists in the multilist organization. It is also possible to provide any number of secondary indexes in organization. In the extreme case we have the situation illustrated in fig6 an indexing on every secondary field, or called inverted organization (the symbol ^ is used to mean pointer to).

Possible representation SNAME Pointers Smith ^S1 Jones ^S2 Blake ^S3 Clark ^S4 Adams ^S5 SNAME Index Fig 6: Inverted Organization

Possible representation SNAME Pointers Smith ^S1 Jones ^S2 Blake ^S3 Clark ^S4 Adams ^S5 STATUS Pointers 10 ^S2 20 ^S1, ^S4 30 ^S3, ^S5 STATUS Index SNAME Index Fig 6: Inverted Organization

Possible representation SNAME Pointers Smith ^S1 Jones ^S2 Blake ^S3 Clark ^S4 Adams ^S5 STATUS Pointers 10 ^S2 20 ^S1, ^S4 30 ^S3, ^S5 CITY Pointers Athens ^S5 London ^S1, ^S4 Paris ^S3, ^S2 STATUS Index CITY Index SNAME Index Fig 6: Inverted Organization

Possible representation SNAME Pointers Smith ^S1 Jones ^S2 Blake ^S3 Clark ^S4 Adams ^S5 S# S1 S2 S3 S4 S5 CITY Pointers Athens ^S5 London ^S1, ^S4 Paris ^S3, ^S2 CITY Index SUPPLIER FILE SNAME Index Fig 6: Inverted Organization

Possible representation The organization will give good performance in response to a request for (all supplier with a given property). A request for (all properties of given supplier) will take a long time to answer.

Summary: In this learning sequence, we discussed the following topic: - Three possible representations for some sample data.

END