“ Possible representation (3) “

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

From Class Diagrams to Databases. So far we have considered “objects” Objects have attributes Objects have operations Attributes are the things you record.
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.
Databases and Processing Modes. Fundamental Data Storage Concepts and Definitions What is an entity? An entity is something about which information is.
Introduction to Databases Transparencies
Concepts of Database Management Seventh Edition Chapter 1 Introduction to Database Management.
Databases and Database Management Systems
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.
Hierarchical Model.
Concepts of Database Management Seventh Edition
Concepts of Database Management, Fifth Edition Chapter 1: Introduction to Database Management.
Concepts of Database Management Eighth Edition
Chapter 2 CIS Sungchul Hong
1 California State University, Fullerton 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.
XP New Perspectives on Microsoft Access 2002 Tutorial 1 1 Microsoft Access 2002 Tutorial 1 – Introduction To Microsoft Access 2002.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
XP New Perspectives on Microsoft Access 2002 Tutorial 1 1 Microsoft Access 2002 Tutorial 1 – Introduction To Microsoft Access 2002.
FILES AND DATABASES. A FILE is a collection of records with similar characteristics, e.g: A Sales Ledger Stock Records A Price List Customer Records Files.
Chapter 10 Designing the Files and Databases. SAD/CHAPTER 102 Learning Objectives Discuss the conversion from a logical data model to a physical database.
Concepts of Database Management Seventh Edition Chapter 1 Introduction to Database Management.
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.
Introduction to Databases Transparencies
Introduction to Databases
Databases and DBMSs Todd S. Bacastow January
- The most common types of data models.
Let try to identify the conectivity of these entity relationship
Data Indexing Herbert A. Evans.
Module 11: File Structure
Client/Server Databases and the Oracle 10g Relational Database
CHP - 9 File Structures.
NetApp Online Ordering User Tutorial
Fundamentals of Databases
“ Database (DB) and Database Management System (DBMS) “
View Design and Integration
Access Reports.
Chapter 9 Database Systems
Secondary Storage Management 13.5 Arranging data on disk
Introduction to Databases Transparencies
Introduction to Databases
Introduction to Databases
Database Actors Welcome : To the third learning sequence “ DB ACTORS “
Appendix D: Network Model
Modern Systems Analysis and Design Third Edition
Review Graph Directed Graph Undirected Graph Sub-Graph
What is a Database and Why Use One?
Chapter 9 Designing Databases
Introduction to Database Systems
Data Base System Lecture : Database Environment
Tutorial 1 – Introduction To Microsoft Access 2003
Secondary Storage Management 13.5 Arranging data on disk
Tutorial 1 – Introduction To Microsoft Access 2003
Introduction to Databases
Chapter 14 Normalization – Part I Pearson Education © 2009.
Introduction to Data Structures
Introduction to Databases
Appendix D: Network Model
Introduction to Databases Transparencies
A Very Brief Introduction to Relational Databases
“ Possible representation (2) “
“ Possible representation (1) “
File Organization.
Question 1: Basic Concepts (45 %)
Unit 12 Index in Database 大量資料存取方法之研究 Approaches to Access/Store Large Data 楊維邦 博士 國立東華大學 資訊管理系教授.
Database Management system
Advance Database System
Unit 12 Index in Database 大量資料存取方法之研究 Approaches to Access/Store Large Data 楊維邦 博士 國立東華大學 資訊管理系教授.
Presentation transcript:

“ Possible representation (3) “ Welcome: To the sixth learning sequence “ Possible representation (3) “ Recap : In the previous learning sequence, we discussed four possible representations. Present learning: We shall explore the following topics: - Hierarchical organization. - Hash – addressing. - Network data structure.

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 8- Another representation that should be mentioned is the hierarchical organization; illustrated in fig7 Here we have one stored file containing three (hierarchical) stored record occurrences, one for each city. Part of each stored record occurrence consists of variable _ length (list) of supplier entries. One for each supplier in that city and each supplier entry contains supplier number and name

Possible representation Athens London Paris Fig 7: Hierarchical Organization

Possible representation Athens London Paris S5 Adams Fig 7: Hierarchical Organization

Possible representation Athens London Paris S5 Adams S1 Smith S4 Clark Fig 7: Hierarchical Organization

Possible representation Athens London Paris S5 Adams S1 Smith S4 Clark S2 Jones S3 Blake Fig 7: Hierarchical Organization

Possible representation 9- The basic idea of Hash – addressing is that each stored record occurrence in the database at a location whose address (SRA) may be completed as name function (hash function) of a value that appears in that occurrence – usually the primary key value.

Possible representation Thus to store the occurrence initially. That (DBMS) compute the (SRA) and instruct the Access method to place the occurrence (record) at that position. To retrieve (access) the occurrence (record), the DBMS perform the same computation (algorithm) as before and then request the access method to fetch the occurrence at that computed position. The advantage of this organization is that provides very fast direct access on the basic of values of the hashed field.

Possible representation As an example of hash – addressing let us assume that the S # values are (100,200,300,400,500) and let us consider the hash function (algorithm). SRA=remainder after dividing by 13 The SRA = for the five supplier are there 9 , 5 , 1 , 10 , 6 respectively, giving us there representation shown in fig 8.

Possible representation 1 S300 Blake 30 Paris 2 3 4 5 S200 Jones 20 Paris 6 S500 Adams 30 Athens 7 8 9 10 S400 Clark 20 London 11 Fig 8: A Hash-addressing Organization

Possible representation 10- A Network data structure allows any entity to have any number of subordinates or superiors. A network structure is shown in figure 9. Entities are connected using network links, which are data items common to both of the connected entities. Some of problems inherent in hierarchical structures can be alleviated using the network structure, but the network structure is more complex.

Possible representation Entity Entity Link Link Link Link Entity Entity Entity Fig 9: A Network structure

Possible representation An example of the compact disc ordering database using a network structure is shown in figure 10. The entities (ITEM-DESCRIPTION and ORDER-DETAILS) are connected by network links (STATUS-LINK). Updating record (such as correcting a person’s credit-card number) is easier than in hierarchical structure, because order record (10784 for “MacRae”) appears only once. It is also possible to insert records for customers who have not yet placed orders (for instance, if they wish to be on a catalog mailing list). The appropriate ITEM-DESCRIPTION can be added at a later date, when the order is placed.

Fig 10:Network Structure STATUS-LINK ITEM-DESCRIPTION Shipped5/12 B235 Guys and Dotts 8.99 Shipped5/14 B521 My Fair Lady 6.99 Inprocess B894 42 street 10.99 Inprocess B992 A Chorus Line 10.99 Backordered 10784 MacRae G 2314Curly Circle Lincoin NE 45-4654-76 Shipped5/12 10796 Jones S 34Dream Lane Oklahama OK 45-9876-74 Shipped5/12 11821 Preston R 1003Madison Ave. River City IA 34-7642-64 12845 Channing C 454Hammonia St. NewYork NY 34-0876-87 11872 Kittey R 765Dulcines Drive Lamansha CA 65-8798-87 ORDER-DETAILS Fig 10:Network Structure

Possible representation Our survey of some storage structures permitted by the stored record interface in now complete. In conclusion we should perhaps points out that there is no such thing as a "best" storage structure. What is "best" depend on what is important to the enterprise (organization). It is the responsibility of the DBA to balance large conflicting requirements in choosing a storage structure.

Possible representation The consideration that must be taken into account include so many pointed such as: Retrieval performance. The difficulty of applying change. The amount of storage space available. The ease with which the database may be reorganized. Desired frequency of such reorganization. Problem of recovery. And so on.

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

END