1 Welcome: To the fifth learning sequence “ Possible representation (2) “ Recap : In the previous learning sequence, we discussed four possible representations.

Slides:



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

Unit 5 The Network Model  5.1 The Network Model  5.2 IDMS.
Chapter 3 An Introduction to Relational Databases.
Data Organization - B-trees. A simple index Brighton A Downtown A Downtown A Mianus A Perry A A-101 A-102.
Fundamentals, Design, and Implementation, 9/e Appendix A Data Structures for Database Processing.
Chapter 11 File-System Interface
Faculty of Sciences and Social Sciences HOPE Structured Problem Solving Data Structures 3 Stewart Blakeway FML
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.
Polygonal Meshes 3D Object Representation -Tyler Abrams.
Lead Black Slide. © 2001 Business & Information Systems 2/e2 Chapter 7 Information System Data Management.
CPSC 231 B+Trees (D.H.)1 LEARNING OBJECTIVES Indexes Sequential Access. A Sequence Set B+ tree. –How it works. –Advantages of B+trees over B-trees.
1.A file is organized logically as a sequence of records. 2. These records are mapped onto disk blocks. 3. Files are provided as a basic construct in operating.
Introduction Chapter 1. Reference Book  Database Systems Thomas Connolly, Carolyn Begg, Anne Strachan Addison-Wesley 1999 ISBN:
1 Section 6 Embedded SQL. 6-2 CA306 Embedded SQL Section Content 6.1Embedded SQL 6.2Java Database Connectivity 6.3Web Databases.
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.
Indexing. Goals: Store large files Support multiple search keys Support efficient insert, delete, and range queries.
CS370 Spring 2007 CS 370 Database Systems Lecture 7 The Relational model.
Section 7.2 Arithmetic Sequences Arithmetic Sequence Finding the nth term of an Arithmetic Sequence.
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.
6.8 Case Study: E-R for Supplier-and-Parts Database
1 California State University, Fullerton Chapter 7 Information System Data Management.
1 Session 3 Welcome: To session 3-the 8 th. learning sequence “Relational algebra “ Recap : In the previous learning sequence, we discussed some example.
Logical Database Design ( 補 ) Unit 7 Logical Database Design ( 補 )
Subject Filing AOS 155 Chapter 8.
Chapter 10 Views. Topics in this Chapter What are Views For? View Retrievals View Updates Snapshots SQL Facilities.
File Systems (1). Readings r Reading: Disks, disk scheduling (3.7 of textbook; “How Stuff Works”) r Reading: File System Implementation ( of textbook)
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.
Further Normalization I
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.
COSC 2007 Data Structures II Chapter 15 External Methods.
Data Manipulation 21 After this lecture, you should be able to:  Use SQL SELECT statement effectively to retrieve the data from multiple related tables.
4-1 Topic 6 Linked Data Structures. 4-2 Objectives Describe linked structures Compare linked structures to array- based structures Explore the techniques.
GIS Data Models GEOG 370 Christine Erlien, Instructor.
System design : files. Data Design Concepts  Data Structures  A file or table contains data about people, places or events that interact with the system.
Marwan Al-Namari Hassan Al-Mathami. Indexing What is Indexing? Indexing is a mechanisms. Why we need to use Indexing? We used indexing to speed up access.
1 TOPIC 6 DATABASE 6.1 Introduction to Database 6.2 Basic Concept of Database 6.3 Database Object DATABASE.
Index in Database Unit 12 Index in Database 大量資料存取方法之研究 Approaches to Access/Store Large Data 楊維邦 博士 國立東華大學 資訊管理系教授.
It consists of two parts: collection of files – stores related data directory structure – organizes & provides information Some file systems may have.
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.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Appendix G: Data Structures for Database Processing.
Welcome: To the fifth learning sequence “ Data Models “ Recap : In the previous learning sequence, we discussed The Database concepts. Present learning:
Chapter 11 Indexing And Hashing (1) Yonsei University 1 st Semester, 2016 Sanghyun Park.
Session 3 Implementing Tasks: Maintaining Fidelity Reflecting on Practice: Worthwhile Tasks Reflecting on PracticePark City Mathematics Institute1.
- 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
(Slides by Hector Garcia-Molina,
Linear sequences A linear sequence is a name for a list of numbers where the next number is found by adding or subtracting a constant number. Here is an.
4n + 2 1st term = 4 × = 6 2nd term = 4 × = 10 3rd term
Unit 7 Normalization (表格正規化).
Chapter 11 Indexing And Hashing (1)
Database Design and Programming
INDEXING.
“ Possible representation (2) “
“ Possible representation (1) “
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 楊維邦 博士 國立東華大學 資訊管理系教授.
Unit 12 Index in Database 大量資料存取方法之研究 Approaches to Access/Store Large Data 楊維邦 博士 國立東華大學 資訊管理系教授.
Presentation transcript:

1 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.

2 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.

3 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), a status value (STATUS), and location (CITY).

4 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.

5 Possible representation Athens. LondonParis S1Smith20. S2Jones10S3Black30S4Clark20S5Adams30 Fig 5: Pointer chain..

6 Possible representation Athens. LondonParis S1Smith20. S2Jones10S3Black30S4Clark20S5Adams30. Fig 5: Pointer chain..

7 Possible representation Athens. LondonParis S1Smith20. S2Jones10S3Black30S4Clark20S5Adams30.. Fig 5: Pointer chain..

8 Possible representation Athens. LondonParis S1Smith20. S2Jones10S3Black30S4Clark20S5Adams30.. Fig 5: Pointer chain..

9 Possible representation Athens. LondonParis S1Smith20. S2Jones10S3Black30S4Clark20S5Adams30.. Fig 5: Pointer chain..

10 Possible representation Athens. LondonParis S1Smith20. S2Jones10S3Black30S4Clark20S5Adams Fig 5: Pointer chain..

11 Possible representation Athens. LondonParis S1Smith20. S2Jones10S3Black30S4Clark20S5Adams Fig 5: Pointer chain..

12 Possible representation Athens. LondonParis S1Smith20. S2Jones10S3Black30S4Clark20S5Adams Fig 5: Pointer chain..

13 Possible representation Athens. LondonParis S1Smith20. S2Jones10S3Black30S4Clark20S5Adams Fig 5: Pointer chain..

14 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.

15 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.

16 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.

17 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.

18 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).

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

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

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

22 Possible representation SNAMEPointers Smith^S1 Jones^S2 Blake^S3 Clark^S4 Adams^S5 STATUSPointers 10^S2 20^S1, ^S4 30^S3, ^S5 CITYPointers Athens^S5 London^S1, ^S4 Paris^S3, ^S2 S# S1 S2 S3 S4 S5 SNAME Index STATUS Index CITY Index SUPPLIER File Fig 6: Inverted Organization

23 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.

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

25 END