THE NETWORK DATA MODEL SECTION 8 - PowerPoint PPT Presentation

About This Presentation
Title:

THE NETWORK DATA MODEL SECTION 8

Description:

The network data model represents data in network structures of record types ... Widget. Clamp. Gadget. PRODUCTS. COUNTRIES. The Database from the above example ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 47
Provided by: ianad
Category:

less

Transcript and Presenter's Notes

Title: THE NETWORK DATA MODEL SECTION 8


1
THE NETWORK DATA MODELSECTION 8
  • An early DBMS

2
Background
  • Networks are a natural way of representing
    relationships among objects
  • The network data model represents data in network
    structures of record types connected in
    one-to-one or one-to-many relationships

3
  • Conference on Data Systems Language
  • Early 1960s
  • American Standards Institute (ANSI) 1971
  • IDS and IDMS

4
Concepts
  • Schema
  • Subschema
  • Physical details

5
  • Records and Sets
  • Record type
  • Set
  • Owner record type
  • Member record type

6
A Bachman Diagram
A Data Structure Diagram
7
Instance or Occurrence
An Example of a Network Data Structure
8
  • Types of Networks
  • Simple networks
  • Complex networks
  • Link record type

9
An Example of a Link Record
10
Expanded Example
Converts a complex network into a simple network
11
The Models Relationship to Conceptual Modeling
Semantics
  • An example of a conceptual model?

12
  • RULE 1
  • For each entity of set E in a conceptual schema,
    create a record type R in the network data
    structure. All attributes of E are represented as
    fields in R

13
  • Representing One-to-Many Relationships

14
  • Transforming n-ary Relationships
  • An example could be a three-way relationship

15
  • Must create a link record

16
  • The Database from the above example

LINK 1
PRODUCTS
COUNTRIES
Australia
Widget
LINK 2
Canada
Clamp
LINK 3
USA
Gadget
LINK 4
17
  • Transforming Many-To-Many Relationships
  • An manufacturer may produce many products, and
    any one of these products can be made by several
    manufacturers

18
(No Transcript)
19
Data Definition Language
  • What is the DDL?
  • Use the DDL to define the database schema
  • The following procedure should be used.

20
  • Procedure
  • Create the conceptual data model
  • Map the conceptual data model to network data
    structure diagrams
  • Use the DDL to implement the schema

21
  • A schema is made up of
  • Schema section
  • Record sections
  • Set sections

22
  1. Create the conceptual model

23
  1. Map to a network structure

24
  1. Implement the schema
  1. SCHEMA NAME IS ACCOUNTSREC
  2. RECORD NAME IS CUSTOMER
  3. CUST-ID TYPE IS NUMERIC INTEGER
  4. NAME TYPE IS CHARACTER 15
  5. ADDRESS TYPE IS CHARACTER 20
  6. ACCOUNT-BALANCE TYPE IS NUMERIC (5,2)
  7. RECORD NAME IS INVOICE
  8. INVONO TYPE IS NUMERIC INTEGER
  9. DATE TYPE IS CHARACTER 9
  10. AMOUNT TYPE IS NUMERIC (5,2)
  11. STATUS TYPE IS CHARACTER 2
  12. RECORD NAME IS LINE-ITEM
  13. STOCKNO TYPE IS NUMERIC INTEGER
  14. DESCRIPTION TYPE IS CHARACTER 20
  15. PRICE TYPE IS NUMERIC (4,2)
  16. CUSTINV

25
  • From Schema to Subschema
  • Title division
  • Mapping division
  • Structure division
  • Subschema record section
  • Subschema set section

26
  • Subschema Example
  • SS INVSTATUS WITHIN ACCOUNTSREC.
  • MAPPING DIVISION.
  • ALIAS SECTION.
  • AD RECORD CUSTOMER IS OWEDBY.
  • AD SET CUST-INV IS OWEDBY INV.
  • STRUCTURE DIVISION.
  • RECORD SECTION.
  • 01 OWEDBY.
  • 05 CUST-ID.
  • 05 NAME.
  • 05 ACCOUNT-BALANCE.
  • 01 INVOICE ALL.
  • SET SECTION.
  • SD OWEDBY-INV

27
Data Manipulation Language
  • What is the DML?
  • Process records one at a time
  • The following procedure should be used.

28
  • Basic Commands
  • Navigational commands
  • Retrieval commands
  • Update commands
  • Records
  • Sets

29
  • Basic DML Commands

30
  • Some terms defined
  • User working area
  • Currency indicators
  • Status flags
  • Record templates

31
Relationship of User Working Area to Database
Instances
32
  • Retrieval and Update
  • FIND Command
  • GET Command

33
(No Transcript)
34
  • ERASE Command

35
  • MODIFY Command

36
  • STORE Command

37
  • Set Operations
  • CONNECT Command

38
  • DISCONNECT Command

39
  • RECONNECT Command

40
  • Set Membership Classification
  • Set insertion class
  • Defined by the statement
  • INSERTION IS ltinsert modegt
  • Manual insertion or Automatic insertion

41
  • Manual Insertion Mode
  • Must be placed by using CONNECT
  • CONNECT ltrecord typegt TO ltset typegt

42
(No Transcript)
43
  • Automatic Insertion Mode
  • Must be placed by using STORE
  • STORE ltrecord typegt

44
  • Set Retention
  • Retention options are
  • Fixed
  • Mandatory
  • Optional

45
(No Transcript)
46
Implementation
  • Large size
  • Well-defined repetitive queries
  • Well-defined transactions
  • Well-defined applications
Write a Comment
User Comments (0)
About PowerShow.com