Tuesday, December 27, 2016

Record based logical models


Record based logical models are used in describing data at the logical and view levels. It is used to specify the overall logical structure of the database.
Record based models are so named because the database is structured in fixed format records of several types. Each record type defines a fixed no. of fields, or attributes, and each field is usually of a fixed length. The three most widely accepted record based data models are the relational, network and hierarchical models.

i) Relational model

The relational model uses a collection of relations(tables) to represent both data and the relationships among those data. Each table has multiple columns, and each column has a unique name.
Customer Name
Address
Account No.
Account No.
Balance
Ram
KTM
A-1
A-1
500
Laxman
Lalitpur
A-2
A-2
700
Bharat
Jhapa
A-3
A-3
900
Fig. A sample relational database

ii)Network model

Data in the network model are represented by collections of records and relationships among data are represented by links, which can be viewed as pointers.
Ram
KTM
0001

A-1
500
Laxman
Lalitpur
0002

A-2
900
Bharat
Janakpur
0003

A-3
6000
Fig. A sample Network database
CustomersName
DustomerStreet
CustomerCity
deposit
Account No
Balance
Customer

Account
Fig. data structure diagram for network data model

iii) Hierarchical model

It is similar to the network model in the sense that data and relationships among data are represented by records and links, respectively. Records are organized as collections of trees rather than arbitrary graphs.

                                                                           Fig. A sample hierarchical database                 
Custom erName
CustomerStreet
CustomerCity
Customer




Account No.
Balance

Account
Fig. Tree structure diagram for hierarchical model

Physical models

Physical data models are used to describe data at the lowest level. There are only few physical data modes in use. Two widely known ones are the unifying model and the frame memory model.

Schemas and instances

Database=description of database + database itself
The overall design of the database is called database schema. Database schema is specified during database design and not expected to change frequently.
Student
Course
Name
Class
Major
Course Name
Duration
Remarks






Fig. Schema Diagram
Database changes over time as information is inserted and deleted. The collection of information stored in the database at a particular moment is called instances in the database. It is also called database state or snapshot or current set of occurrences. When database is designed, the database is in empty state with no data. It is in initial state when database is loaded with data. Thus at any point, database has a current state. When any field is added to database, it is called schema evolution.

No comments:

Mobile Cloud Computing

Cloud Computing offers such smartphones that have rich Internet media support, require less processing and consume less power. In terms of ...