“ Possible representation (1) “

Slides:



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

BA271 Week 6 Lecture Database Overview Dave Sullivan.
Microsoft Access 2003 Introduction To Microsoft Access 2003.
Concepts of Database Management Sixth Edition
Access A Relational Database Management System. Prof. Leighton2 Database ► A database is a collection of data that’s related to a particular topic ► A.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 1 1 Microsoft Access 2003 Tutorial 1 – Introduction To Microsoft Access 2003.
CS 255: Database System Principles slides: Variable length data and record By:- Arunesh Joshi( 107) Id: Cs257_107_ch13_13.7.
The Relational Database Model
CS370 Spring 2007 CS 370 Database Systems Lecture 7 The Relational model.
Concepts of Database Management Seventh Edition
Introduction –All information systems create, read, update and delete data. This data is stored in files and databases. Files are collections of similar.
Business Process Modeling
Data Manipulation 11 After this lecture, you should be able to:  Understand the differences between SQL (Structured Query Language) and other programming.
Copyrighted material John Tullis 10/17/2015 page 1 04/15/00 XML Part 3 John Tullis DePaul Instructor
Chapter 7 Relational Algebra. Topics in this Chapter Closure Revisited The Original Algebra: Syntax and Semantics What is the Algebra For? Further Points.
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.
XP New Perspectives on Microsoft Access 2002 Tutorial 1 1 Microsoft Access 2002 Tutorial 1 – Introduction To Microsoft Access 2002.
XP New Perspectives on Microsoft Access 2002 Tutorial 1 1 Microsoft Access 2002 Tutorial 1 – Introduction To Microsoft Access 2002.
BA271 Week 6 Lecture Dave Sullivan. Goal for today… Status Report – Review where we are … Status Report – Review where we are … Begin learning about Microsoft.
Index in Database Unit 12 Index in Database 大量資料存取方法之研究 Approaches to Access/Store Large Data 楊維邦 博士 國立東華大學 資訊管理系教授.
1 Welcome: To the forth learning sequence “ Possible representation (1) “ Recap : In the previous learning sequence, we discussed the basic definitions.
Welcome: To the fifth learning sequence “ Data Models “ Recap : In the previous learning sequence, we discussed The Database concepts. Present learning:
Introduction to Database Systems – CSC R.M. Hafeez Javed A Presentation by.
Data Modeling Using the Entity- Relationship (ER) Model
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Databases and DBMSs Todd S. Bacastow January
- The most common types of data models.
Chapter 5 UNDERSTANDING AND DESIGNING ACCOUNTING DATA
“ Possible representation (3) “
Entity- Relationship (ER) Model
Data Indexing Herbert A. Evans.
Session 3 Welcome: To session 3-the fourth learning sequence
Module 11: File Structure
Introduction To Database IT-402
CHP - 9 File Structures.
Indexing Goals: Store large files Support multiple search keys
“ Database (DB) and Database Management System (DBMS) “
Databases Chapter 16.
Storage and Indexes Chapter 8 & 9
Databases and Database Management Systems Chapter 9
Database Actors Welcome : To the third learning sequence “ DB ACTORS “
Appendix D: Network Model
Chapter 4 Relational Databases
Review Graph Directed Graph Undirected Graph Sub-Graph
Databases and Information Management
What is a Database and Why Use One?
Chapter 9 Designing Databases
Tutorial 1 – Introduction To Microsoft Access 2003
Managing data Resources:
Tutorial 1 – Introduction To Microsoft Access 2003
Chapter 14 Normalization – Part I Pearson Education © 2009.
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Relational Database Model
Session 2 Welcome: The seventh learning sequence
Databases and Information Management
Accounting Information Systems 9th Edition
Database Design Hacettepe University
Operating Systems : Overview
Session 3 Welcome: To session 3-the 8th. learning sequence
Operating Systems : Overview
“ Possible representation (2) “
Question 1: Basic Concepts (40 %)
Databases and Information Management
Question 1: Basic Concepts (45 %)
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Unit 12 Index in Database 大量資料存取方法之研究 Approaches to Access/Store Large Data 楊維邦 博士 國立東華大學 資訊管理系教授.
EGR 2131 Unit 12 Synchronous Sequential Circuits
Unit 12 Index in Database 大量資料存取方法之研究 Approaches to Access/Store Large Data 楊維邦 博士 國立東華大學 資訊管理系教授.
Lecture 10 Structuring System Requirements: Conceptual Data Modeling
Presentation transcript:

“ Possible representation (1) “ Welcome: To the forth learning sequence “ Possible representation (1) “ Recap : In the previous learning sequence, we discussed the basic definitions of database subject. Present learning: We shall explore the following topics: - Regular organization. - Factoring out the CITY value. - Indexing on city. - Combination the previous representations.

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 five suppliers; for each supplier we wish to record a: Supplier number (S#), a supplier name (SNAME), and location (CITY).

Possible representation 1- Note that the (Figure1) actually a very simple conceptual model of the data. S# SNAME CITY S1 Smith London S2 JOHNS Paris S3 BLACKE S4 CLARK S5 ADAMS Athens Fig 1: sample data regular organization

Possible representation The representation in fig 1 (file containing five stored record occurrence) has the advantage of simplicity but would probably be inadequate for various reasons in a realistic situation. Suppose, for example we have (10.000) suppliers instead of just of five, but that they were located in only (10) different cities.

Possible representation 2- If we assume that the amount of storage required for a pointer is less than that required a city name, the representation illustrated in fig2 will clearly save some storage space in such a situation.

Possible representation SNAME CITY POINTER S1 Smith S2 JOHNS S3 BLACKE S4 CLARK S5 ADAMS CITY Athens London Paris City file Supplier file Fig2: Factoring out the CITY value

Possible representation SNAME CITY POINTER S1 Smith S2 JOHNS S3 BLACKE S4 CLARK S5 ADAMS CITY Athens London Paris City file Supplier file Fig2: Factoring out the CITY value

Possible representation Here we have two stored files, a supplier file and a city file, with pointers out of the former into the later. These pointers are Stored Record Addresses (SRAs). The only advantage of this representation (compared with the previous one) is the saving in space. A request to find all properties (attributes) of a given supplier (entity) will require at least one more access than before.

Possible representation 3- A request to find all suppliers (entities) in a given CITY will involve several more access. If such a case requested and it is an important one. The DBA may choose the alternative representation shown in fig3.

Possible representation SNAME S1 Smith S2 JOHNS S3 BLACKE S4 CLARK S5 ADAMS CITY SUPPLEIRPOINTER Athens London Paris Supplier file City file Fig3: Indexing on city

Possible representation SNAME S1 Smith S2 JOHNS S3 BLACKE S4 CLARK S5 ADAMS CITY SUPPLEIRPOINTER Athens London Paris Supplier file City file Fig3: Indexing on city

Possible representation Here again we have two stored file. A supplier file and a city file but this time there are pointers out of the later city into the firmer supplier. Each city stored record occurrence contains pointers to all corresponding supplier stored record occurrence.

Possible representation It should be obvious that the last representation of data (factoring out the city) is better than the previous figure (Indexing on city) for queries asking for all supplier in a given city but worse for queries asking for all attributer of given supplier. Here we conclude that representation of data is strongly dependent on the queries (access) asked by the system user.

Possible representation Also it is worth to mention, that it is the database Management System (DBMS), not the Access Method that maintain the pointers; the access method is only responsible for assigning a unique stored record address (SRA) as it was mentioned before. The interesting thing about the previous representation is that the CITY file is an index to the SUPPLIER file (an index controlled by the DBMS, not by the access method).

Possible representation 4- To obtain the advantages of each of the previous two representation (at the cost of repairing slightly more storage space and probably more significant having more pointer maintenance to do when changes occur); we can have the following representation for data (fig 4).

Possible representation Athens . London . Paris . S1 Smith . S2 Jones S3 Black S4 Clark S5 Adams Fig 4: Combination the previous Fig2@3

Possible representation Athens . London . Paris . . S1 Smith . S2 Jones S3 Black S4 Clark S5 Adams . Fig 4: Combination the previous Fig2@3

Possible representation Athens . London . Paris . . . . S1 Smith . S2 Jones S3 Black S4 Clark S5 Adams . Fig 4: Combination the previous Fig2@3

Possible representation Athens . London . Paris . . . . S1 Smith . S2 Jones S3 Black S4 Clark S5 Adams . Fig 4: Combination the previous Fig2@3

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

END