Разделы презентаций


Network Data Model

Содержание

CONTENTSBrief historyNetwork data structureNetwork data structure operationsIntegrity constraintsAdvantages and drawbacks

Слайды и текст этой презентации

Слайд 1Lecture 4. Network Data Model
National Aviation University
Computer Science Faculty
Department of

Software Engineering

Lecture 4. Network Data ModelNational Aviation UniversityComputer Science FacultyDepartment of Software Engineering

Слайд 2CONTENTS
Brief history
Network data structure
Network data structure operations
Integrity constraints
Advantages and drawbacks

CONTENTSBrief historyNetwork data structureNetwork data structure operationsIntegrity constraintsAdvantages and drawbacks

Слайд 3Brief history
Data Base Task Group (DBTG) CODASYL

DBTG reports in

1971 and 1978.

Network data model was proposed that supports

m:n relationships

The following DB languages was specified for the first time:
Schema DDL (conceptual level)
Subschema DDL (external level)
Stored Data Definition Language– SDDL (internal level)
DML

Implementation - Integrated Database Management System (IDMS) компании Cullinet Software, Inc.,
Brief historyData Base Task Group (DBTG) CODASYL DBTG reports in 1971 and 1978. Network data model was

Слайд 4Fields and record types
Graphic notation:

TEACHER (Name, Post, Address)
Data field (item)

– elementary named data. Its instance (occurrence) is a data value.


Record type – is a uniquely named collection of field names:


TEACHER


Name

Post

Address

Record type instance – ordered collection of fields instances:


TEACHER


Johnson

professor

Kiev

Fields and record typesGraphic notation:TEACHER (Name, Post, Address)Data field (item) –	elementary named data. Its instance (occurrence) is

Слайд 5Keys
Two or more different records within a network data base

may have duplicate values of all data items.
The Data Base

Key (DBK) is a unique internal identifier of any record. DBK is automatically assigned to any record when it is stored in DB and do not changed when a record is updated.

CALC key is an internal identifier of any record, that assigned to a record on the base of values of a specified record fields.

KeysTwo or more different records within a network data base may have duplicate values of all data

Слайд 6Set type and instance (occurrence)
Set type is named two

level hierarchical relationship of the record types. With the help

of sets composition multilevel hierarchical and network structures may be constructed.

Set owner. There is only one set owner record
Set members. There may be 0, 1 or more set member records.

Set instance (occurrence) consists of one instance of the owner record type and any number of instances of the member record types

Thus the set represent two level hierarchical one-to-many relationship.

Set type and instance (occurrence) Set type is named two level hierarchical relationship of the record types.

Слайд 7Example of the set type and instance


DEPARTMENT

TEACHER

SUBJECT


logics
DBMS

С language


Peter
John

Ann

SE
Department Structure
Set owner
Set

members

Set type Set instance

Set name

Example of the set type and instanceDEPARTMENT    TEACHER   SUBJECTlogicsDBMSС languagePeterJohnAnn

Слайд 8Multilevel Hierarchy


DEPARTMENT
TEACHER

SUBJECT
Department

Structure

BOOK

ARTICLE
Scientific Works
Owner

of the set «Department Structure»

Members of the set «Department Structure»

Owner of the set «Scientific Works»

Members of the set «Scientific Works»

Multilevel HierarchyDEPARTMENT    TEACHER   SUBJECT Department Structure     BOOK

Слайд 9Representation of m:n relationships


DEPARTMENT
TEACHER

SUBJECT

Department Structure

BOOK

ARTICLE
Scientific

Works


GROUP


LECTURE

Attend

Is taught at

Has

m:n

m:n

Representation of m:n relationshipsDEPARTMENT   TEACHER   SUBJECT Department Structure     BOOK

Слайд 10Schema and instance of m:n relationships

TEACHER

SUBJECT

LECTURE
Is_taught_at
Has
Teachers
Lectures
Subjects

SUBJECT

LECTURE

Is_taught_at

Has



TEACHER

Schema and instance of m:n relationships    TEACHER   SUBJECT    LECTUREIs_taught_atHasTeachersLecturesSubjects

Слайд 11Cycles and loops

PLANT

CONTRACT

PART

PRODUCT

ASSEMBLY

PART
Consists of
Consists of
Cycle

Loop
Cycles and loops  PLANTCONTRACT   PART PRODUCT ASSEMBLY   PARTConsists ofConsists ofCycle

Слайд 12Possible categories of network schemas

Possible categories of network schemas

Слайд 13Application and DBMS
User Work Area (UWA) contains:
current state indicators,
records,
error status.

Application and DBMSUser Work Area (UWA) contains:current state indicators,records,error status.

Слайд 14Network data model operations
Data selection (Query Language - QL):
FIND -

locates a described record occurrence
GET - reads a record occurrence

from the database

Data manipulation (Data Manipulation Language-DML):
STORE - puts a record occurrence into the database
INSERT - inserts member record into a set occurrence
REMOVE - removes member record from a set occurrence
DELETE - deletes current record from DB
MODIFY - updates current record
Network data model operationsData selection (Query Language - QL):FIND 	- locates a described record occurrenceGET 	- reads

Слайд 15Data searching and selection
Record location. A desired record occurrence is

located. Located record occurrence becomes current. Current status indicator in

UWA points to a located record occurrence
There is really set of FIND command that allow :
find the record by a key,
find any member record in a set occurrence,
scan a set occurrence for those member records having specified values in certain fields,
find an owner record of a given set occurrence.

FIND

Puts selected (current) record into UWA.

GET

Data searching and selectionRecord location. A desired record occurrence is located. Located record occurrence becomes current. Current

Слайд 16Fine the record by DB-key

FIND [record-name] RECORD BY DATABASE KEY

[variable]
Syntax:
Example:

X=10;
FIND Faculty RECORD BY DATABASE KEY X;
If Error_Status=0

then GET Faculty;
Else Print "Not Found !";
Fine the record by DB-keyFIND [record-name] RECORD BY DATABASE KEY [variable]Syntax:Example:X=10; FIND Faculty RECORD BY DATABASE KEY

Слайд 17Fine the record by field values
In order to find a

record directly using known values of its fields, such fields

should be defined as so-called CALC-keys in the database schema.


FIND [record-name] RECORD BY CALC-KEY

Syntax:

Example: Find lecture record with LID field value “L3” (Field LID is defined as как CALC-field)


Lecture.LID = "L3";
FIND Lecture RECORD BY CALC-KEY;

Fine the record by field valuesIn order to find a record directly using known values of its

Слайд 18Scanning a Set Occurrence
The set occurrence can be viewed

as a “ring” consisting of the owner record and all

of the member records. Member records are ordered within there owner record.


SUBJECT


LECTURE

Is_taught_at

Has


TEACHER

Scanning a Set Occurrence The set occurrence can be viewed as a “ring” consisting of the owner

Слайд 19The next member record in the set occurrence

FIND NEXT [record-name]

RECORD IN [set-name] SET
Syntax:
Example:

FIND NEXT Lecture RECORD IN Has SET;

The next member record in the set occurrenceFIND NEXT [record-name] RECORD IN [set-name] SETSyntax:Example:FIND NEXT Lecture RECORD

Слайд 20The prior member record in the set occurrence

FIND PRIOR [record-name]

RECORD IN [set-name] SET
Syntax:
Пример:

FIND PRIOR Lecture RECORD IN Has SET;

The prior member record in the set occurrenceFIND PRIOR [record-name] RECORD IN [set-name] SETSyntax:Пример:FIND PRIOR Lecture RECORD

Слайд 21The first and the last member record in the set

occurrence


FIND FIRST|LAST [record-name] RECORD IN [set-name] SET
Syntax:
Example:

FIND FIRST Lecture RECORD

IN Has SET;

Current occurrence of the set “Has”

L1 - the first member record of the set “Has”

Error_Status != 0 – the record occurrence do not have member records


L1 L2 L3 L4 L5

S1 S2 S3

T1 T2











The first and the last member record in  the set occurrenceFIND FIRST|LAST [record-name] RECORD IN [set-name]

Слайд 22Location of the owner record of the current set occurence

FIND

OWNER OF [set-name] SET
Syntax:
Example:

FIND OWNER OF Has SET

Location of the owner record of the  current set occurenceFIND OWNER OF [set-name] SETSyntax:Example:FIND OWNER OF

Слайд 23Example


X = ”T1”;
FIND Teacher RECORD BY DATABASE KEY X;
FIND

LAST Lecture RECORD IN Has SET;
FIND OWNER OF Is_taught_at SET;
FIND

LAST Lecture RECORD IN Is_taught_at SET;
FIND NEXT Lecture RECORD IN Has SET;
FIND OWNER OF Is_taught_at SET;






T1
L3
S2
L4
L5
S3

ExampleX = ”T1”; FIND Teacher RECORD BY DATABASE KEY X;FIND LAST Lecture RECORD IN Has SET;FIND OWNER

Слайд 24Put a record occurrence into the database
create a record occurrence

in UWA;
execute the command STORE.

STORE [record-name] RECORD
Syntax:
Example:

STORE Teacher RECORD
Stored record

automatically connected to the current set occurrence.
Put a record occurrence into the databasecreate a record occurrence in UWA;execute the command STORE.STORE [record-name] RECORDSyntax:Example:STORE

Слайд 25Attaching record occurrence from DB to the set occurrence
Make required

set occurrence the current of set type
Make inserted record occurrence

the current one
Execute the command INSERT


INSERT [record-name] RECORD INTO [set-name] SET

Syntax:

Example:


X = 31; FIND Teacher RECORD BY DATABASE KEY x;
Y = 24; FIND Lecture RECORD BY DATABASE KEY y;
INSERT Lecture RECORD INTO Has SET;

Attaching record occurrence from DB  to the set occurrenceMake required set occurrence the current of set

Слайд 26Remove a record occurrence of a certain type from a

certain set occurrence
Make designated record be the current one
Execute the

command REMOVE


REMOVE [record-name] RECORD FROM [set-name] SET

Syntax:

Example: Remove all lectures of the teacher with DBK 31.


x=31; FIND Teacher RECORD BY DATABASE KEY x;
Loop: FIND NEXT Lecture RECORD IN Has SET;
IF Error_Status=0 THEN BEGIN; REMOVE Lecture RECORD FROM Teacher SET;
GO TO Loop;
END;

Remove a record occurrence of a certain  type from a certain set occurrenceMake designated record be

Слайд 27Updating record occurrence
The MODIFY command copies values from a record

in UWA into the current record occurrence of the DB.


Example: For teacher with DBK 31 change name to “Smith”.


x=31; FIND Teacher RECORD BY DATABASE KEY x;
GET Teacher RECORD;
Teacher.Name = ”Smith”;
MODIFY RECORD;

Updating record occurrenceThe MODIFY command copies values from a record in  UWA into the current record

Слайд 28Deleting record occurrence from DB
The DELETE command removes from DB

the current record occurrence
The set owner may be deleted

when this set do not contains member records


DELETE [record-name] RECORD

Syntax:

Example: Delete record with DBK 21.


x=21; FIND Lecture RECORD BY DATABASE KEY x;
DELETE Lecture RECORD;

Deleting record occurrence from DBThe DELETE command removes from DB the current  record occurrence The set

Слайд 29Advantages and drawbacks
The network data model basically has the same

advantages and drawbacks as hierarchical data model.

The only basic difference

of the network data model in comparison with hierarchical data model is the opportunity to represent many-to-many relationships.
Advantages and drawbacksThe network data model basically has the same  advantages and drawbacks as hierarchical data

Обратная связь

Если не удалось найти и скачать доклад-презентацию, Вы можете заказать его на нашем сайте. Мы постараемся найти нужный Вам материал и отправим по электронной почте. Не стесняйтесь обращаться к нам, если у вас возникли вопросы или пожелания:

Email: Нажмите что бы посмотреть 

Что такое TheSlide.ru?

Это сайт презентации, докладов, проектов в PowerPoint. Здесь удобно  хранить и делиться своими презентациями с другими пользователями.


Для правообладателей

Яндекс.Метрика