ASIET KALADY
Database Models
Prerequsite Doccument Datamining
Respa Peter
10/8/2013
Rollno:12
Database
Databases are designed to offer an organized mechanism for storing, managing and
retrieving information. They do so through the use of tables. It is an organized collection of data.
The data are typically organized to model relevant aspects of reality in a way that supports
processes requiring this information.
A database is a collection of information organized to provide efficient retrieval. The
collected information could be in any number of formats (electronic, printed, graphic, audio,
statistical, combinations). There are physical (paper/print) and electronic databases.
A database could be as simple as an alphabetical arrangement of names in an address book or as
complex as a database that provides information in a combination of formats.
Examples:
 phone book
 address book
 Census Bureau data
Database model
A data model is a collection of concepts and rules for the description of the structure of
the database. Structure of the database means the data types, the constraints and the relationships
for the description or storage of data respectively.
A database model is a type of data model that determines the logical structure of a
database and fundamentally determines in which manner data can be stored, organized, and
manipulated. The most popular example of a database model is the relational model, which uses
a table-based format.
Common logical data models for databases include:
 Hierarchical database model
 Network model
 Relational model
 Entity–relationship model
o Enhanced entity–relationship model
 Object model
 Document model
Hierarchical Model
The hierarchical data model organizes data in a tree structure. There is a hierarchy of
parent and child data segments. This structure implies that a record can have repeating
information, generally in the child data segments.
Data in a series of records, which have a set of field values attached to it. It collects all
the instances of a specific record together as a record type. These record types are the equivalent
of tables in the relational model, and with the individual records being the equivalent of rows.
To create links between these record types, the hierarchical model uses Parent Child
Relationships. These are a 1:N mapping between record types. This is done by using trees, like
set theory used in the relational model, "borrowed" from maths.
. For example,
an organization might store information about an employee, such as name, employee
number, department, salary. The organization might also store information about an employee's
children, such as name and date of birth.
The employee and children data forms a hierarchy, where the employee data represents
the parent segment and the children data represents the child segment. If an employee has three
children, then there would be three child segments associated with one employee segment.
In a hierarchical database the parent-child relationship is one to many. This restricts a
child segment to having only one parent segment.
Hierarchical structures were widely used in the early mainframe database management
systems, such as the Information Management System (IMS) by IBM, and now describe the
structure of XML documents. This structure allows one one-to-many relationship between two
types of data. This structure is very efficient to describe many relationships in the real world;
recipes, table of contents, ordering of paragraphs/verses, any nested and sorted information.
This hierarchy is used as the physical order of records in storage. Record access is done
by navigating through the data structure using pointers combined with sequential accessing.
Because of this, the hierarchical structure is inefficient for certain database operations when a
full path (as opposed to upward link and sort field) is not also included for each record.
Network Model
The network model expands upon the hierarchical structure, allowing many-to-many
relationshipsinatree-like structure thatallowsmultiple parents. It was the most popular before being
replaced by the relational model, and is defined by the CODASYL specification.
The network model organizes data using two fundamental concepts, called records and sets.
Recordscontainfields(whichmaybe organizedhierarchically,asinthe programming language COBOL).
Sets(not to be confused with mathematical sets) define one-to-many relationships between records.
The network model is able to represent redundancy in data more efficiently than in the
hierarchical model, and there can be more than one path from an ancestor node to a descendant. The
operationsof the networkmodel are navigational in style: a program maintains a current position, and
navigates from one record to another by following the relationships in which the record participates.
Relational model
The relational model is the best known and in today’s DBMS most often implemented
database model. It defines a database as a collection of tables (relations) which contain all data.
The relational model was introduced by E.F. Codd in 1970 as a way to make database
management systems more independent of any particular application. It is a mathematical model
defined in terms of predicate logic and set theory, and systems implementing it have been used
by mainframe, midrange and microcomputer systems.
A relational database contains multiple tables, each similar to the one in the "flat"
database model. One of the strengths of the relational model is that, in principle, any value
occurring in two different records (belonging to the same table or to different tables), implies a
relationship among those two records.
Fig: Relational model
For example, an "orders" table might contain (customer-ID, product-code) pairs and a
"products" table might contain (product-code, price) pairs so to calculate a given customer's bill you
wouldsumthe pricesof all products ordered by that customer by joining on the product-code fields of
the two tables. This can be extended to joining multiple tables on multiple fields. Because these
relationshipsare onlyspecified at retreival time, relational databases are classed as dynamic database
management system.
The RELATIONAL database model is based on the Relational Algebra.
Object-oriented database models
The object-orientedprogramming paradigmwasappliedtodatabase technology,creatinganew
database model known as object databases. This aims to avoid the object-relational impedance
mismatch - the overhead of converting information between its representation in the database (for
example as rows in tables) and its representation in the application program (typically as objects).
Object databases also introduce the key ideas of object programming, such as encapsulation
and polymorphism, into the world of databases.
Object databases suffered because of a lack of standardization: although standards were
defined by ODMG, they were never implemented well enough to ensure interoperability between
products.
Object-orientedmodelsdefineadatabase as a collectionof objectswithfeatures and methods.
A detailed discussion of object-oriented databases follows in an advanced module.
Dimensional model
The dimensional model is a specialized adaptation of the relational model used to
represent data in data warehouses in a way that data can be easily summarized using online
analytical processing, or OLAP queries. In the dimensional model.
Database schema consists of a single large table of facts that are described using
dimensions and measures. A dimension provides the context of a fact (such as who participated,
when and where it happened, and its type) and is used in queries to group related facts together.
Dimensions tend to be discrete and are often hierarchical; for example, the location might
include the building, state, and country. A measure is a quantity describing the fact, such as
revenue. It is important that measures can be meaningfully aggregated—for example, the
revenue from different locations can be added together.
Entity–relationship model
An entity–relationship model (ER model) is a data model for describing a
database in an abstract way. An ER model is an abstract way of describing a database. In the case
of a relational database, which stores data in tables, some of the data in these tables point to data
in other tables There are three levels of ER models
• conceptual ER model
o This is the highest level ER model in that it contains the least granular detail
but establishes the overall scope of what is to be included within the model set.
o The conceptual ER model normally defines master reference data entities that are
commonly used by the organization.
• logical ER model
o A logical ER model does not require a conceptual ER model, especially if the scope of
the logical ER model includes only the development of a distinct information system.
o The logical ER model contains more detail than the conceptual ER model. In addition
to master data entities, operational and transactional data entities are now defined
• physical ER models
o One or more physical ER models may be developed from each logical ER model.
o The physical ER model is normally developed to be instantiated as a database.

Database

  • 1.
    ASIET KALADY Database Models PrerequsiteDoccument Datamining Respa Peter 10/8/2013 Rollno:12
  • 2.
    Database Databases are designedto offer an organized mechanism for storing, managing and retrieving information. They do so through the use of tables. It is an organized collection of data. The data are typically organized to model relevant aspects of reality in a way that supports processes requiring this information. A database is a collection of information organized to provide efficient retrieval. The collected information could be in any number of formats (electronic, printed, graphic, audio, statistical, combinations). There are physical (paper/print) and electronic databases. A database could be as simple as an alphabetical arrangement of names in an address book or as complex as a database that provides information in a combination of formats. Examples:  phone book  address book  Census Bureau data Database model A data model is a collection of concepts and rules for the description of the structure of the database. Structure of the database means the data types, the constraints and the relationships for the description or storage of data respectively. A database model is a type of data model that determines the logical structure of a database and fundamentally determines in which manner data can be stored, organized, and manipulated. The most popular example of a database model is the relational model, which uses a table-based format.
  • 3.
    Common logical datamodels for databases include:  Hierarchical database model  Network model  Relational model  Entity–relationship model o Enhanced entity–relationship model  Object model  Document model Hierarchical Model The hierarchical data model organizes data in a tree structure. There is a hierarchy of parent and child data segments. This structure implies that a record can have repeating information, generally in the child data segments. Data in a series of records, which have a set of field values attached to it. It collects all the instances of a specific record together as a record type. These record types are the equivalent of tables in the relational model, and with the individual records being the equivalent of rows. To create links between these record types, the hierarchical model uses Parent Child Relationships. These are a 1:N mapping between record types. This is done by using trees, like set theory used in the relational model, "borrowed" from maths. . For example, an organization might store information about an employee, such as name, employee number, department, salary. The organization might also store information about an employee's children, such as name and date of birth.
  • 4.
    The employee andchildren data forms a hierarchy, where the employee data represents the parent segment and the children data represents the child segment. If an employee has three children, then there would be three child segments associated with one employee segment. In a hierarchical database the parent-child relationship is one to many. This restricts a child segment to having only one parent segment. Hierarchical structures were widely used in the early mainframe database management systems, such as the Information Management System (IMS) by IBM, and now describe the structure of XML documents. This structure allows one one-to-many relationship between two types of data. This structure is very efficient to describe many relationships in the real world; recipes, table of contents, ordering of paragraphs/verses, any nested and sorted information. This hierarchy is used as the physical order of records in storage. Record access is done by navigating through the data structure using pointers combined with sequential accessing. Because of this, the hierarchical structure is inefficient for certain database operations when a full path (as opposed to upward link and sort field) is not also included for each record.
  • 5.
    Network Model The networkmodel expands upon the hierarchical structure, allowing many-to-many relationshipsinatree-like structure thatallowsmultiple parents. It was the most popular before being replaced by the relational model, and is defined by the CODASYL specification. The network model organizes data using two fundamental concepts, called records and sets. Recordscontainfields(whichmaybe organizedhierarchically,asinthe programming language COBOL). Sets(not to be confused with mathematical sets) define one-to-many relationships between records. The network model is able to represent redundancy in data more efficiently than in the hierarchical model, and there can be more than one path from an ancestor node to a descendant. The operationsof the networkmodel are navigational in style: a program maintains a current position, and navigates from one record to another by following the relationships in which the record participates.
  • 6.
    Relational model The relationalmodel is the best known and in today’s DBMS most often implemented database model. It defines a database as a collection of tables (relations) which contain all data. The relational model was introduced by E.F. Codd in 1970 as a way to make database management systems more independent of any particular application. It is a mathematical model defined in terms of predicate logic and set theory, and systems implementing it have been used by mainframe, midrange and microcomputer systems. A relational database contains multiple tables, each similar to the one in the "flat" database model. One of the strengths of the relational model is that, in principle, any value occurring in two different records (belonging to the same table or to different tables), implies a relationship among those two records. Fig: Relational model For example, an "orders" table might contain (customer-ID, product-code) pairs and a "products" table might contain (product-code, price) pairs so to calculate a given customer's bill you wouldsumthe pricesof all products ordered by that customer by joining on the product-code fields of the two tables. This can be extended to joining multiple tables on multiple fields. Because these relationshipsare onlyspecified at retreival time, relational databases are classed as dynamic database management system. The RELATIONAL database model is based on the Relational Algebra.
  • 7.
    Object-oriented database models Theobject-orientedprogramming paradigmwasappliedtodatabase technology,creatinganew database model known as object databases. This aims to avoid the object-relational impedance mismatch - the overhead of converting information between its representation in the database (for example as rows in tables) and its representation in the application program (typically as objects). Object databases also introduce the key ideas of object programming, such as encapsulation and polymorphism, into the world of databases. Object databases suffered because of a lack of standardization: although standards were defined by ODMG, they were never implemented well enough to ensure interoperability between products.
  • 8.
    Object-orientedmodelsdefineadatabase as acollectionof objectswithfeatures and methods. A detailed discussion of object-oriented databases follows in an advanced module. Dimensional model The dimensional model is a specialized adaptation of the relational model used to represent data in data warehouses in a way that data can be easily summarized using online analytical processing, or OLAP queries. In the dimensional model. Database schema consists of a single large table of facts that are described using dimensions and measures. A dimension provides the context of a fact (such as who participated, when and where it happened, and its type) and is used in queries to group related facts together. Dimensions tend to be discrete and are often hierarchical; for example, the location might include the building, state, and country. A measure is a quantity describing the fact, such as revenue. It is important that measures can be meaningfully aggregated—for example, the revenue from different locations can be added together. Entity–relationship model An entity–relationship model (ER model) is a data model for describing a database in an abstract way. An ER model is an abstract way of describing a database. In the case of a relational database, which stores data in tables, some of the data in these tables point to data in other tables There are three levels of ER models • conceptual ER model o This is the highest level ER model in that it contains the least granular detail but establishes the overall scope of what is to be included within the model set.
  • 9.
    o The conceptualER model normally defines master reference data entities that are commonly used by the organization. • logical ER model o A logical ER model does not require a conceptual ER model, especially if the scope of the logical ER model includes only the development of a distinct information system. o The logical ER model contains more detail than the conceptual ER model. In addition to master data entities, operational and transactional data entities are now defined • physical ER models o One or more physical ER models may be developed from each logical ER model. o The physical ER model is normally developed to be instantiated as a database.