data base models

23
DATA BASE MODELS DATA BASE MODELS

Upload: thanigaivel06

Post on 21-May-2017

221 views

Category:

Documents


0 download

TRANSCRIPT

DATA BASE MODELSDATA BASE MODELS

NETWORK MODELNETWORK MODEL The Network Database consists of a The Network Database consists of a

collection of records connected to one collection of records connected to one another through linksanother through links

A record is in many respects similar to an A record is in many respects similar to an entity in the entity relationship model.entity in the entity relationship model.

Each record is a collection of fields , each Each record is a collection of fields , each of which contains only one data value.of which contains only one data value.

A link is an association between precisely A link is an association between precisely two records.two records.

DATA STRUCTURE DIAGRAMDATA STRUCTURE DIAGRAM

A Data Structure diagram is a schema A Data Structure diagram is a schema representing the design of a network representing the design of a network database.database.

This Diagram consists of to basic This Diagram consists of to basic components : boxes , which corresponds components : boxes , which corresponds to record types, and lines which to record types, and lines which corresponds to Links.corresponds to Links.

A Data structure diagram specifies the A Data structure diagram specifies the overall logical structure of the database.overall logical structure of the database.

The Access to the data is processed by The Access to the data is processed by associated application programassociated application program

The rules of data access is to be defined The rules of data access is to be defined when the data structure is defined.when the data structure is defined.

The access rules are difficult to modify The access rules are difficult to modify after the data base is implemented after the data base is implemented

They are suited for batch operation that They are suited for batch operation that are highly structured and repetitive are highly structured and repetitive involving high transaction rates.involving high transaction rates.

Example of a Network Model Example of a Network Model In CIM (E-R Diagram)In CIM (E-R Diagram)

Employee No

Name Dept

Emp Address

Status

Dept Location

Dept N

ame

Project Handled

Network Model In CIM Network Model In CIM (Data Structure Diagram)(Data Structure Diagram)

R-LINK

Emp No Emp Name Emp Add

Proj No Proj Name

Dept nameDept location Dept NO

Employee detail Dept DetailsProject Details

Emp LKDept LK

Pro LK

The record type Employee corresponds to the The record type Employee corresponds to the entity set Employee Number, Employee Name entity set Employee Number, Employee Name , Employee address, Employee address

Similarly Department is the record type Similarly Department is the record type Corresponding to the entity set Department Corresponding to the entity set Department includes three fields Dept name , Dept includes three fields Dept name , Dept location, Dept Numberlocation, Dept Number

Thus the link employee is linked to the project Thus the link employee is linked to the project details and the department .details and the department .

Hierarchical ModelHierarchical Model The typical Hierarchical file structure is The typical Hierarchical file structure is

shown below.shown below.Level -I

Level-II

Level-III

The nodes at level -2 are the children of the The nodes at level -2 are the children of the nodes at level-I.nodes at level-I.

The nodes at level 2 in turn become The nodes at level 2 in turn become parents of nodes in level 3.parents of nodes in level 3.

The data files are arranged in a tree like The data files are arranged in a tree like structure.structure.

This facilitates searches along branch This facilitates searches along branch lines: records are subordinated to other lines: records are subordinated to other records at higher level.records at higher level.

Starting at the root of the tree, each file has Starting at the root of the tree, each file has a one to many relationship to its branches.a one to many relationship to its branches.

A parent file can have several children.A parent file can have several children.

A good example of such an organization A good example of such an organization might be the parts list ,in which each might be the parts list ,in which each product composed of assemblies which are product composed of assemblies which are in turn composed of sub assemblies and/ or in turn composed of sub assemblies and/ or component parts.component parts.

Example of Hierarchical Example of Hierarchical database structure. database structure.

Centre Lathe Assembly

Bed assembly Saddle assembly Head Stock assembly Tail Stock Assembly

Shaft Assembly Shaft Assembly Spindle assembly

Spindle Back Gear

The tree structure diagram is the schema for The tree structure diagram is the schema for a hierarchical database.a hierarchical database.

This diagram consists of two basic This diagram consists of two basic components : Boxes which correspond to components : Boxes which correspond to record types and lines which corresponds to record types and lines which corresponds to links.links.

A Tree structure diagram is similar to the data A Tree structure diagram is similar to the data structure diagram in a network model.structure diagram in a network model.

Relational data base Relational data base modelmodel

The relational model has established The relational model has established itself as the primary data model for itself as the primary data model for commercial data-processing applications.commercial data-processing applications.

The relational model is now being used in The relational model is now being used in numerous application outside the domain numerous application outside the domain of traditional data processing. of traditional data processing.

Relational data base Relational data base modelmodel

A relational database consists of a collection of A relational database consists of a collection of tables, each of which is assigned a unique tables, each of which is assigned a unique name.name.

A row in a table represents a A row in a table represents a relationshiprelationship among a set of values.among a set of values.

Since a table is a collection of such Since a table is a collection of such relationships. there is a close correspondence relationships. there is a close correspondence between the concept of between the concept of tabletable and mathematical and mathematical concept of concept of relationrelation, from which the relational , from which the relational data model takes its name.data model takes its name.

Relational data base Relational data base modelmodel For a large variety of For a large variety of

manufacturing manufacturing application data is application data is organized in the form organized in the form of a table.of a table.

An example for each An example for each set of data is given in set of data is given in Table.Table.

NoNo DD D1D1 DD D2D2 BB rr r1r1

64036403 1717 2626 6262 5353 1717 22 11

64046404 2020 2929 7272 6363 1919 22 11

64056405 2525 3636 00 6969 2121 2.52.5 1.51.5

64066406 1717 2626 6262 5353 1717 22 11

Relational data baseRelational data basemodelmodel

There is a correspondence between the There is a correspondence between the concept of a table and the mathematical concept of a table and the mathematical concept of a relation.concept of a relation.

In a Relational database management system In a Relational database management system an entity is an object that is distinguishable an entity is an object that is distinguishable from other objects.from other objects.

An entity set is a set of entities of the same An entity set is a set of entities of the same type and is represented by a set of attributes.type and is represented by a set of attributes.

For each attribute there is a set of permitted For each attribute there is a set of permitted values for domains.values for domains.

Relational data baseRelational data basemodelmodel

An entity relationship model (E-R Model) An entity relationship model (E-R Model) is based on the perception of the real is based on the perception of the real world which consist of a set of entities world which consist of a set of entities and relationships among them.and relationships among them.

Process planning is a good example of Process planning is a good example of such an interactive need to evaluate such an interactive need to evaluate many data relationship in order to arrive many data relationship in order to arrive at a logical sequence of properly defined at a logical sequence of properly defined manufacturing steps.manufacturing steps.

Relational data baseRelational data basemodelmodel

The relational database eliminates the need to The relational database eliminates the need to follow predefined access paths to reach target follow predefined access paths to reach target data, and makes data access more flexible.data, and makes data access more flexible.

The database user gains quicker access to The database user gains quicker access to information since the database provides direct information since the database provides direct access to all data.access to all data.

The access is independent of the way it is The access is independent of the way it is stored.stored.

Relational data baseRelational data basemodelmodel

The Relational data base management system The Relational data base management system is also flexible.is also flexible.

Hence relational database facilities Hence relational database facilities unanticipated queries and makes relational unanticipated queries and makes relational database well suited to the manufacturing database well suited to the manufacturing environment.environment.

Several vendors now offer relational database Several vendors now offer relational database management system, suitable for CIM management system, suitable for CIM application.application.

Features of Relational Features of Relational data base modeldata base model

Adhoc or unanticipated queries. This is Adhoc or unanticipated queries. This is typical in a manufacturing environment.typical in a manufacturing environment.

Relational database is dynamic. The Relational database is dynamic. The relationships change and are extended relationships change and are extended frequently in a manufacturing database.frequently in a manufacturing database.

Suitable where enterprises information Suitable where enterprises information has to be available to a large number of has to be available to a large number of user for decision making.user for decision making.

Features of Relational Features of Relational data base modeldata base model

Desirable where application Desirable where application specifications, development and specifications, development and maintenance cost are to be minimum.maintenance cost are to be minimum.

Compatible with distributed databases.Compatible with distributed databases.

Some important Features of Some important Features of Relational data base modelRelational data base model

Guaranteed logical accessibility.Guaranteed logical accessibility. Dynamic on-line catalogue .Dynamic on-line catalogue . Comprehensive data sublanguage.Comprehensive data sublanguage. Updateable views.Updateable views.

Some important Features of Some important Features of Relational data base modelRelational data base model

High –level insert updates and delete.High –level insert updates and delete. Physical data independence.Physical data independence. Logical data independence.Logical data independence. Integrity independence.Integrity independence. Distribution independence.Distribution independence.