Unit 5 The Network Model  5.1 Data Modeling Issues  5.2 The Network Model  5.3 IDMS.

Slides:



Advertisements
Similar presentations
Chapter A: Network Model
Advertisements

Database Languages Chapter 7. The Relational Algebra.
Unit 5 The Network Model  5.1 The Network Model  5.2 IDMS.
The Hierarchical Model
Chapter 3 An Introduction to Relational Databases.
Wei-Pang Yang, Information Management, NDHU More on Normalization Unit 18 More on Normalization ( 表格正規化探討 ) 18-1.
Chapter 16 The Hierarchical and Network Data Models David M. Kroenke Database Processing © 2000 Prentice Hall.
Feb 2001CSS/416: Module U1 Workshop 21 CSS/416 Data Design And Information Retrieval Workshop 2.
N-dimensional space navigation is only possible in a logical rather han a physical world. They didn’t have any books to look after - their information.
Chapter 2 Database Environment. Agenda Three-Level ANSI-SPARC Architecture Database Languages Data Models Functions of DBMS Components of DBMS Teleprocessing.
Introduction Chapter 1. Reference Book  Database Systems Thomas Connolly, Carolyn Begg, Anne Strachan Addison-Wesley 1999 ISBN:
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.
CS370 Spring 2007 CS 370 Database Systems Lecture 2 Overview of Database Systems.
Copyright © 2003 by Prentice Hall Module 4 Database Management Systems 1.What is a database? Data hierarchy and data organization Field, record, file,
THE NETWORK DATA MODEL SECTION 8 An early DBMS. Background Networks are a natural way of representing relationships among objects The network data model.
Data Manipulation 11 After this lecture, you should be able to:  Understand the differences between SQL (Structured Query Language) and other programming.
Chapter 2 Database Environment
6.8 Case Study: E-R for Supplier-and-Parts Database
Introduction to SQL Steve Perry
STORING ORGANIZATIONAL INFORMATION— DATABASES CIS 429—Chapter 7.
A.1 Chapter A: Network Model Basic Concepts Data-Structure Diagrams The DBTG CODASYL Model DBTG Data-Retrieval Facility DBTG Update Facility DBTG Set-Processing.
3-1 Unit 3 The Relational Model. 3-2 Wei-Pang Yang, Information Management, NDHU Outline  3.1 Introduction  3.2 Relational Data Structure  3.3 Relational.
4B-1 Wei-Pang Yang, Information Management, NDHU Introduction to Database CHAPTER 4B ( 補 ) DB2 and SQL  Overview  Data Definition  Data Manipulation.
1 Structured Query Language (SQL) CIS*2450 Advanced Programming Concepts.
Logical Database Design ( 補 ) Unit 7 Logical Database Design ( 補 )
Wei-Pang Yang, Information Management, NDHU Normalization Unit 7 Normalization ( 表格正規化 ) 7-1.
Chapter 10 Views. Topics in this Chapter What are Views For? View Retrievals View Updates Snapshots SQL Facilities.
Chapter 15 Relational Implementation with DB2 David M. Kroenke Database Processing © 2000 Prentice Hall.
10/21/2015 M Sliming 1 Intro to IDMS Margaret Sliming.
Further Normalization I
Chapter 2 Database Environment. Agenda Three-Level ANSI-SPARC Architecture Database Languages Data Models Functions of DBMS Components of DBMS Data Dictionary.
1 Chapter 1 Introduction. 2 Introduction n Definition A database management system (DBMS) is a general-purpose software system that facilitates the process.
1-1 Homework 3 Practical Implementation of A Simple Rational Database Management System.
Data Definition After this lecture, you should be able to:
Unit 4 The Hierarchy Model
CS 1308 Computer Literacy and the Internet
Data Manipulation 21 After this lecture, you should be able to:  Use SQL SELECT statement effectively to retrieve the data from multiple related tables.
Algebra1 After this lecture, you should be able to:  Understand the differences between SQL (Structured Query Language) and Relational Algebra expressions.
Data Structure Concepts Record Collection of field values Grouped as record types Parent-Child Relationships 1 :N Occurrence : ONE parent and zero or.
Perform DFS from A A B C D E F G. Perform BFS from A A B C D E F G.
An Introduction to SQL For CS Overview of SQL  It is the standard language for relational systems, although imperfect  Supports data definition.
Index in Database Unit 12 Index in Database 大量資料存取方法之研究 Approaches to Access/Store Large Data 楊維邦 博士 國立東華大學 資訊管理系教授.
Unit 2 DB2 and SQL. 2-2 Wei-Pang Yang, Information Management, NDHU Outline of Unit Overview 2.2 Data Definition 2.3 Data Manipulation 2.4 The System.
Chapter 3: Relational Databases
Views Prof. Yin-Fu Huang CSIE, NYUST Chapter 10. Advanced Database System Yin-Fu Huang 10.1Introduction Example: Var Good_Supplier View (S Where Status.
Before the Relational Model COMP3211 Advanced Databases Dr Nicholas Gibbins –
Data and Applications Security Developments and Directions Dr. Bhavani Thuraisingham The University of Texas at Dallas Lecture #2 Supporting Technologies:
Chapter 4 An Introduction to SQL. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.4-2 Topics in this Chapter SQL: History and Overview The.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
Structured Query Language IV Asma Ahmad (C. J. Date) Database Systems.
“Introduction To Database and SQL”
Lecture 3 : Structured Query Language (SQL)
Unit 2 DB2 and SQL.
Database Management System
Appendix D: Network Model
Introduction to Database Management System
Chapter 2 Database Environment.
Introduction to Database
Introduction to Database
پايگاه داده ها.
Φροντιστήριο SQL (από το βιβλίο του Date)
Unit 7 Normalization (表格正規化).
Appendix D: Network Model
STRUCTURE OF PRESENTATION :
Question 1: Basic Concepts (45 %)
Updating Databases With Open SQL
STRUCTURE OF PRESENTATION :
Legacy Databases.
Updating Databases With Open SQL
Presentation transcript:

Unit 5 The Network Model  5.1 Data Modeling Issues  5.2 The Network Model  5.3 IDMS

5-2 Wei-Pang Yang, Information Management, NDHU 5.1 Data Modeling Issue  Issue: How to represent entities and relationships?  Two major paradigms Relational Graph {  E.g., a 'pile' of data John, 25, NCTU, CS Dept,... Mary, 22, NCTU, IS Dept, COBOL 01 data-record 02 name PIC X(6) 02 age PIC 9(2) 02 univ PIC X(4) 02 dept PIC X(3) Hierarchical Network S PSP

5-3 Wei-Pang Yang, Information Management, NDHU Model 1: Relational  Model 1: Relational - Decomposition (normalization issue) Emp Dept Project

5-4 Wei-Pang Yang, Information Management, NDHU Model 2: Hierarchical Dept ProjectEmp

5-5 Wei-Pang Yang, Information Management, NDHU Model 3: Network  Model 3: Network proposed by CODASYL Dept Project Emp 1:M M : M E-P 1:M

5-6 Wei-Pang Yang, Information Management, NDHU 5.2 The Network Model  Data Structure Consider the 'supplier-and-parts‘ database SPSP } Structure Sample values S# SNAME STATUS CITY S1 Smith 20 London S2 Jones 10 Paris S3 Blake 30 Paris S4 Clark 20 London S5 Adams 30 Athens P# PNAME COLOR WEIGHT CITY P1 Nut Red 12 London P2 Bolt Green 17 Paris P3 Screw Blue 17 Rome P4 Screw Red 14 London P5 Cam Blue 12 Paris P6 Cog Red 19 London S# P# QTY S1 P1 300 S1 P2 200 S1 P3 400 S1 P4 200 S1 P5 100 S1 P6 100 S2 P1 300 S2 P2 400 S3 P2 200 S4 P2 200 S4 P4 300 S4 P5 400

5-7 Wei-Pang Yang, Information Management, NDHU The Network Model: Sets and Structure  Network Model  two sets{  Structure  Sample values: occurrences, data, records (Ref. next page)  Note: Three record types: S, P, SP Two link types: S-SP, p-SP a set of records (Record types): entities a set of links (Link types): relationship S P S-SP P-SP QTY (Links) S# SNAME STATUS CITY SP

5-8 Wei-Pang Yang, Information Management, NDHU S1 P1 300 …… S2 P1 300 S2 P (p. 2-5) SP P S S1 Smith 20 London S2 S3S4S5 P1 P2P3P4P5P The Network Model: Sample Values

5-9 Wei-Pang Yang, Information Management, NDHU The Network Model: Data Manipulation  Data Manipulation locate a specific record move from a parent to its first child move from one child to the next. create a new record delete a new record update a new record connect a child into a link  Data Integrity Rule: A child can not be inserted unless its parent already exists

5-10 Wei-Pang Yang, Information Management, NDHU 5.3 IDMS: Overview  Runs on IBM mainframes; a product of Cullinet Software  The best known example that based on DBTG (The CODASYL DataBase Task Group)  An IDMS database is defined by DMS Schema DDL (Data Definition Language)  Schema defines: (1) records in the database (2) elements (i.e. fields) (3) sets (i.e. links) owner (parent) member (child) S P SP

5-11 Wei-Pang Yang, Information Management, NDHU IDMS: Data Structure  Consider the data structure of the "suppliers-and-parts" database: S P S-SP P-SP SP S-File P-File (system link) S P S-SP P-SP SP system an extended form S# P# QTY S# P# QTY Note: It may be convenient regarding all roots as children of a hypothetical system record.

5-12 Wei-Pang Yang, Information Management, NDHU IDMS: Schema for Suppliers-and-parts 1 SCHEMA NAME IS SUPPLIERS-AND-PARTS 2 RECORD NAME IS S. 3 LOCATION MODE IS CALC USING S# 4 DUPLICATES NOT ALLOWED S# PIC X(5) SNAME PIC X(20) STATUS PIC 999 USAGE COMP CITY PIC X(15). 9 RECORD NAME IS P. 10 LOCATION MODE IS CALC USING P# 11 DUPLICATES NOT ALLOWED P# PIC X(6) PNAME PIC X(20) COLOR PIC X(6) WEIGHT PIC 999 USAGE COMP CITY PIC X(15). 17 RECORD NAME IS SP. 18 LOCATION MODE IS VIA S-SP SET QTY PIC USAGE COMP SET NAME IS S-SP. 21 ORDER IS NEXT. 22 OWER IS S. 23 MEMBER IS SP OPTIONAL MANUAL. 24 SET NAME IS P-SP. 25 ORDER IS NEXT. 26 OWNER IS P. 27 MEMBER IS SP OPTIONAL MANUAL. 28 SET NAME IS S-FILE. 29 ORDER IS SORTED. 30 OWER IS SYSTEM. 31 MEMBER IS S MANDATORY AUTOMATIC 32 ASCENDING KEY IS CITY. 33 SET NAME IS P-FILE. 34 ORDER IS SORTED. 35 OWNER IS SYSTEM. 36 MEMBER IS P MANDATORY AUTOMATIC 37 ASCENDING KEY IS COLOR.

5-13 Wei-Pang Yang, Information Management, NDHU IDMS: Subschema “ View ” 1 ADD SUBSCHEMA NAME IS S-AND-P-ONLY 2 OF SCHEMA NAME IS SUPPLIERS-AND-PARTS. 3 ADD RECORD S. 4 ADD RECORD P 5 ELEMENTS ARE 6 P# 7 COLOR 8 CITY. 9 ADD SET S-FILE. 10 ADD SET P-FILE. Subschema name S-File P-File (system link) S P P# COLOR CITY system

5-14 Wei-Pang Yang, Information Management, NDHU IDMS: Data Manipulation Working area: Currency indicator: similar to current of cursor in SQL, and current position in IMS COBOL. record description. for each subschema record type to be processed (i.e. UWA working area in DBTG) } 77 ICB (IDMS Communication Block) (ref 4-9) error-status (similar to SQLCA in DB2)

5-15 Wei-Pang Yang, Information Management, NDHU IDMS: Data Manipulation (cont.)  Selected commands: Bind: Associates IDMS record types and control blocks with space Ready:Prepares database areas for processing Commit: Effects a checkpoint for recovery procedures Rollback: Requests recovery of the database Finish: Releases database areas Find: Locates a record occurrence in the database Get: Delivers a record occurrence to variable storage Store: Adds a record occurrence to the database Modify: Rewrites a record occurrence in the database Connect: Links a record occurrence to a set Disconnect: Dissociates a record occurrence from the database Erase: Deletes a record occurrence from the database If: Tests whether a set is empty or whether a record occurrence is a member Keep: Locks a record occurrence against access or update by another run unit …