ASSIGNMENT#1
DATABASE SYSTEM Page 1
DATA MODELS
Data Model:
“ An integrated collection of concepts for describing and manipulating data,
Relationships between data,and constraints on the data in an organization.”
A database model is a theory or specification describing how a database is structured and used.
Several such models have been suggested.A data model is not just a way of structuring data: it
also defines a set of operations that can be performed on the data.Some common models
includes:
 Flat File Model
 Hierarchal Model
 Network Model
 Relational Model
 Object Relational Model
 Object based model(Entity Relationship)
Flat File Model:
The flat (or table) model consists of a single, two-dimensional array of data elements, where all
members of a given column are assumed to be similar values, and all members of a row are
assumed to be related to one another. For instance, columns for name and password that might be
used as a part of a system security database. Each row would have the specific password
associated with an individual user. Columns of the table often have a type associated with them,
defining them as character data, date or time information, integers, or floating
How It Works
To make a flat file data model functional, all relevant information about a record needs to be
stored in the same file. In a CSV sheet, for example, no application-specific formats apply to the
data contained within the file; only a comma denotes the end of one field in a record. Each
record is written on a line in the file, allowing all data for a single record to be stored separately
from other records.
ASSIGNMENT#1
DATABASE SYSTEM Page 2
Such databases can quickly become very large and difficult to manage because of the simple way
they are organized. Many modern data models use connected tables to organize groups of related
data. This makes such information easier to locate and more flexible to work with/
Flat File Data Model
 At File Data Model Contains A Single Structure, Two-Dimensional Array
of Data Elements Representing One Specific Business Area.
 All The Members of A Given Column in The Two-Dimensional Array Are Assumed To
Contain Similar Values of Same Data type
 All Members of A Row Are Assumed To Be Related To One Another As Per The
Business Requirements.
Advantages
 Flat File Database is Simple To Develop And Easy To Implement
 Can Be Considered For Small Databases With Small Business Units
 We Can Avail The Locking Facilities Provided By The Operating System Locking
Concepts
Dis-Advantages
 Cannot Control The Data Redundancy
 Transactional Management Can Be A Big Head-Ache
 Concurrency Management Can Be A Big Bottle Neck As The Number of Clients
Increase
 Flat File Database is A Big Botheration For Storage As it can Be Stored And Operated
From Only One Location
 Flat File Databases Are Very Critical To Recover When Corrupted.

11/8/2012
ASSIGNMENT#1
DATABASE SYSTEM Page 3
Object Relational Model:
The objectrelational model isdesignedtoprovide arelational databasemanagementthatallows
developerstointegrate databaseswiththeir datatype andmethods.Itisessentiallyarelationalmodel
that allowsuserstointegrate object-orientedfeaturesintoit.
Functions:
The main function of the object relational model is to combine the convenience of the
relational model with the object model.The benefit of this combination range from scalability to
sup port for rich data type.
The primary function of this model is to more
power,greater flexibility,better performance and greater
data integrity than those that comes before it.The object
relationsl model allow the users to define data
type,function and also operators.As a direct result of this
functionality and performance of this model are
optimized.It can be said that obeject relational model is
an evolutionary technology this approach has taken on
the roubust trabsuction and performance management
aspect of its predeccesser.
Advantages:
Some of the benefits that are offered by the object relational model include:
 Extensibility: Users are able to extended the capability of the database .
 Complex Types: It allow users to define new data type that combine one or more of the
current existing data types.
 Inheritance: Users able to define object or type and table that procur the properties of
other object as well as new properties that are specific to the oject that has been defined.
The object relational database management system(ORDMS) these system provide an addition
of new and extensive object storage,capability to the relational model and the centre of the more
modern information system of today.
 Object-Relational Data Models Add New Object Storage Capabilities To The Relational
Systems At The Core of Modern Information Systems.
 The Object-Relational Data Models Provide New Facilities To Integrate Traditional
Business Data With Complex Objects Such As Time-Series And Geospatial Data.
 The Object Relational Data Models Provide Features Like
o Type Constructor For Objects And Object Types
o Object Identity And References
o Collection Type Constructors For Nested Tables And Complex Objects
ASSIGNMENT#1
DATABASE SYSTEM Page 4
o Reference Type Constructor
o Methods For Object Types
o Object Tables
(Object relational model)
Object-based Model:
“Object based data model use concepts such as entities,attributes and relationships.”
Object-based logical models:
Describe data at the conceptual and view levels.
o Provide fairly flexible structuring capabilities.
o Allow one to specify data constraints explicitly.
o Over 30 such models, including:
 Entity-relationship model.
 Object-oriented model.
 Binary model.
 Semantic data.
Entity-RelationshipModel
The Entity-Relationship (ER) model, a high-level data model that is useful in developing a
conceptual design for a database. In 1976, Chen developed the Entity-Relationship (ER)
model, a high-level data model that is useful in developing a conceptual design for a database.
ASSIGNMENT#1
DATABASE SYSTEM Page 5
Creation of an ER diagram, which is one of the first steps in designing a database, helps the
designer(s) to understand and to specify the desired components of the database and the
relationships among those components. An ER model is a diagram containing entities or "items",
relationships among them, and attributes of the entities and the relationships.
Entity
An entity is a real-world item or concept that exists on its own. The set of all possible values for
an entity is the entity type.
. In our example, a particular student , team, lab section, or experiment is an entity. The set of all
possible values for an entity, such as all possible students, is the entity type. In an ER model, we
diagram an entity type as a rectangle containing the type name, such as student.
Attribute
An attribute of an entity is a particular property that describes the entity. The set of all possible
values of an attribute is the attribute domain.
Each entity has attributes, or particular properties that describe the entity. For example, students
has properties of his own Student Identification number, name, and grade. A particular value of
an attribute, such as 93 for the grade, is a value of the attribute. Most of the data in a database
consists of values of attributes. The set of all possible values of an attribute, such as integers
from 0 to 100 for a grade, is the attribute domain.
A simple attribute is one component that is atomic. A composite attribute has multiple
components, each of which is atomic or composite.
.
ASSIGNMENT#1
DATABASE SYSTEM Page 6
Relationship
A relationship type is a set of associations among entity types. A relationship or relationship
instance is an ordered pair consisting of particular related entities. For example, the student
entity type is related to the team entity type because each student is a member of a team.
ASSIGNMENT#1
DATABASE SYSTEM Page 7
Types of Relationships in ER model:
1-One-to-One
Consider the example of a university.For one Department there can be only one department
head.This is one-to-one relationship.
2-One-to-Many:
A STUDENT can MAJOR in only one course,but many STUDENTs would have registered for a
given MAJOR course.This is one-to-many relationship.
.
3-Many-to-Many:
A STUDENT can make many coursesand many STUDENTs can registered for a given
COURSE.This is called many-to-many relationship.
ASSIGNMENT#1
DATABASE SYSTEM Page 8
Refrences:
 http://en.wikipedia.org/wiki/Database_model.
 http://www.inf.unibz.it/~franconi/teaching/2000/ct481/er-mo.
.http://www.cs.sfu.ca/CourseCentral/354/zaiane/material/notes/Chapter2/nod
e1.htmldelling/.

 http://woffor http://en.wikipedia.org/wiki/Object-relational_mappingd-
ecs.org/dataandvisualization/ermodel/material.htm.
 www.wisegeek.com/what-is-a-flat-file.htm

Data models

  • 1.
    ASSIGNMENT#1 DATABASE SYSTEM Page1 DATA MODELS Data Model: “ An integrated collection of concepts for describing and manipulating data, Relationships between data,and constraints on the data in an organization.” A database model is a theory or specification describing how a database is structured and used. Several such models have been suggested.A data model is not just a way of structuring data: it also defines a set of operations that can be performed on the data.Some common models includes:  Flat File Model  Hierarchal Model  Network Model  Relational Model  Object Relational Model  Object based model(Entity Relationship) Flat File Model: The flat (or table) model consists of a single, two-dimensional array of data elements, where all members of a given column are assumed to be similar values, and all members of a row are assumed to be related to one another. For instance, columns for name and password that might be used as a part of a system security database. Each row would have the specific password associated with an individual user. Columns of the table often have a type associated with them, defining them as character data, date or time information, integers, or floating How It Works To make a flat file data model functional, all relevant information about a record needs to be stored in the same file. In a CSV sheet, for example, no application-specific formats apply to the data contained within the file; only a comma denotes the end of one field in a record. Each record is written on a line in the file, allowing all data for a single record to be stored separately from other records.
  • 2.
    ASSIGNMENT#1 DATABASE SYSTEM Page2 Such databases can quickly become very large and difficult to manage because of the simple way they are organized. Many modern data models use connected tables to organize groups of related data. This makes such information easier to locate and more flexible to work with/ Flat File Data Model  At File Data Model Contains A Single Structure, Two-Dimensional Array of Data Elements Representing One Specific Business Area.  All The Members of A Given Column in The Two-Dimensional Array Are Assumed To Contain Similar Values of Same Data type  All Members of A Row Are Assumed To Be Related To One Another As Per The Business Requirements. Advantages  Flat File Database is Simple To Develop And Easy To Implement  Can Be Considered For Small Databases With Small Business Units  We Can Avail The Locking Facilities Provided By The Operating System Locking Concepts Dis-Advantages  Cannot Control The Data Redundancy  Transactional Management Can Be A Big Head-Ache  Concurrency Management Can Be A Big Bottle Neck As The Number of Clients Increase  Flat File Database is A Big Botheration For Storage As it can Be Stored And Operated From Only One Location  Flat File Databases Are Very Critical To Recover When Corrupted.  11/8/2012
  • 3.
    ASSIGNMENT#1 DATABASE SYSTEM Page3 Object Relational Model: The objectrelational model isdesignedtoprovide arelational databasemanagementthatallows developerstointegrate databaseswiththeir datatype andmethods.Itisessentiallyarelationalmodel that allowsuserstointegrate object-orientedfeaturesintoit. Functions: The main function of the object relational model is to combine the convenience of the relational model with the object model.The benefit of this combination range from scalability to sup port for rich data type. The primary function of this model is to more power,greater flexibility,better performance and greater data integrity than those that comes before it.The object relationsl model allow the users to define data type,function and also operators.As a direct result of this functionality and performance of this model are optimized.It can be said that obeject relational model is an evolutionary technology this approach has taken on the roubust trabsuction and performance management aspect of its predeccesser. Advantages: Some of the benefits that are offered by the object relational model include:  Extensibility: Users are able to extended the capability of the database .  Complex Types: It allow users to define new data type that combine one or more of the current existing data types.  Inheritance: Users able to define object or type and table that procur the properties of other object as well as new properties that are specific to the oject that has been defined. The object relational database management system(ORDMS) these system provide an addition of new and extensive object storage,capability to the relational model and the centre of the more modern information system of today.  Object-Relational Data Models Add New Object Storage Capabilities To The Relational Systems At The Core of Modern Information Systems.  The Object-Relational Data Models Provide New Facilities To Integrate Traditional Business Data With Complex Objects Such As Time-Series And Geospatial Data.  The Object Relational Data Models Provide Features Like o Type Constructor For Objects And Object Types o Object Identity And References o Collection Type Constructors For Nested Tables And Complex Objects
  • 4.
    ASSIGNMENT#1 DATABASE SYSTEM Page4 o Reference Type Constructor o Methods For Object Types o Object Tables (Object relational model) Object-based Model: “Object based data model use concepts such as entities,attributes and relationships.” Object-based logical models: Describe data at the conceptual and view levels. o Provide fairly flexible structuring capabilities. o Allow one to specify data constraints explicitly. o Over 30 such models, including:  Entity-relationship model.  Object-oriented model.  Binary model.  Semantic data. Entity-RelationshipModel The Entity-Relationship (ER) model, a high-level data model that is useful in developing a conceptual design for a database. In 1976, Chen developed the Entity-Relationship (ER) model, a high-level data model that is useful in developing a conceptual design for a database.
  • 5.
    ASSIGNMENT#1 DATABASE SYSTEM Page5 Creation of an ER diagram, which is one of the first steps in designing a database, helps the designer(s) to understand and to specify the desired components of the database and the relationships among those components. An ER model is a diagram containing entities or "items", relationships among them, and attributes of the entities and the relationships. Entity An entity is a real-world item or concept that exists on its own. The set of all possible values for an entity is the entity type. . In our example, a particular student , team, lab section, or experiment is an entity. The set of all possible values for an entity, such as all possible students, is the entity type. In an ER model, we diagram an entity type as a rectangle containing the type name, such as student. Attribute An attribute of an entity is a particular property that describes the entity. The set of all possible values of an attribute is the attribute domain. Each entity has attributes, or particular properties that describe the entity. For example, students has properties of his own Student Identification number, name, and grade. A particular value of an attribute, such as 93 for the grade, is a value of the attribute. Most of the data in a database consists of values of attributes. The set of all possible values of an attribute, such as integers from 0 to 100 for a grade, is the attribute domain. A simple attribute is one component that is atomic. A composite attribute has multiple components, each of which is atomic or composite. .
  • 6.
    ASSIGNMENT#1 DATABASE SYSTEM Page6 Relationship A relationship type is a set of associations among entity types. A relationship or relationship instance is an ordered pair consisting of particular related entities. For example, the student entity type is related to the team entity type because each student is a member of a team.
  • 7.
    ASSIGNMENT#1 DATABASE SYSTEM Page7 Types of Relationships in ER model: 1-One-to-One Consider the example of a university.For one Department there can be only one department head.This is one-to-one relationship. 2-One-to-Many: A STUDENT can MAJOR in only one course,but many STUDENTs would have registered for a given MAJOR course.This is one-to-many relationship. . 3-Many-to-Many: A STUDENT can make many coursesand many STUDENTs can registered for a given COURSE.This is called many-to-many relationship.
  • 8.
    ASSIGNMENT#1 DATABASE SYSTEM Page8 Refrences:  http://en.wikipedia.org/wiki/Database_model.  http://www.inf.unibz.it/~franconi/teaching/2000/ct481/er-mo. .http://www.cs.sfu.ca/CourseCentral/354/zaiane/material/notes/Chapter2/nod e1.htmldelling/.   http://woffor http://en.wikipedia.org/wiki/Object-relational_mappingd- ecs.org/dataandvisualization/ermodel/material.htm.  www.wisegeek.com/what-is-a-flat-file.htm