Lesson2 Database Models
Lesson2 Database Models
Lesson2 Database Models
A database model shows the logical structure of a database, including the relationships
and constraints that determine how data can be stored and accessed. Individual
database models are designed based on the rules and concepts of whichever broader
data model the designers adopt. Most data models can be represented by an
accompanying database diagram.
Data Modeling thus helps to increase consistency in naming, rules, semantics, and
security. This, in turn, improves data analytics. The emphasis is on the need for
availability and organization of data, independent of the manner of its application.
Like any design process, database and information system design begins at a high level
of abstraction and becomes increasingly more concrete and specific.
Data models can generally be divided into three categories, which vary according to
their degree of abstraction. The process will start with a conceptual model, progress to a
logical model and conclude with a physical model. Each type of data model is discussed
in more detail below:
Conceptual data models. They are also referred to as domain models and offer a
big-picture view of what the system will contain, how it will be organized, and
which business rules are involved. Conceptual models are usually created as part
of the process of gathering initial project requirements. Typically, they include
entity classes (defining the types of things that are important for the business to
represent in the data model), their characteristics and constraints, the
relationships between them and relevant security and data integrity
requirements. Any notation is typically simple.
Logical data models. They are less abstract and provide greater detail about the
concepts and relationships in the domain under consideration. One of several
formal data modeling notation systems is followed. These indicate data
attributes, such as data types and their corresponding lengths, and show the
relationships among entities. Logical data models don’t specify any technical
system requirements.. Logical data models can be useful in highly procedural
implementation environments, or for projects that are data-oriented by nature,
such as data warehouse design or reporting system development.
Physical data models. They provide a schema for how the data will be physically
stored within a database. As such, they’re the least abstract of all. They offer a
finalized design that can be implemented as a relational database, including
associative tables that illustrate the relationships among entities as well as the
primary keys and foreign keys that will be used to maintain those relationships.
Physical data models can include database management system (DBMS)-specific
properties, including performance tuning.
The logical vs. physical data model is characterized by the fact that the logical model
describes the data to a great extent, but it does not take part in implementing the
database, which a physical model does. In other words, the logical data model is the
basis for developing the physical model, which gives an abstraction of the database and
helps to generate the schema.
A Database model defines the logical design and structure of a database and defines
how data will be stored, accessed and updated in a database management system.
While the Relational Model is the most widely used database model, there are other
models too:
Hierarchical Model
Network Model
Entity-relationship Model
Relational Model
Hierarchical Model
This database model organises data into a tree-like-structure, with a single root, to
which all the other data is linked. The heirarchy starts from the Root data, and expands
like a tree, adding child nodes to the parent nodes.
In this model, a child node will only have a single parent node.
This model efficiently describes many real-world relationships like index of a book,
recipes etc.
In hierarchical model, data is organised into tree-like structure with one one-to-many
relationship between two different types of data, for example, one department can have
many courses, many professors and of-course many students.
Network Model
This is an extension of the Hierarchical model. In this model data is organised more like
a graph, and are allowed to have more than one parent node.
In this database model data is more related as more relationships are established in this
database model. Also, as the data is more related, hence accessing the data is also easier
and fast. This database model was used to map many-to-many data relationships.
This was the most widely used database model, before Relational Model was
introduced.
Entity-relationship Model
In this database model, relationships are created by dividing object of interest into
entity and its characteristics into attributes.
E-R Models are defined to represent the relationships into pictorial form to make it
easier for different stakeholders to understand.
This model is good to design a database, which can then be turned into tables in
relational model(explained below).
Let's take an example, If we have to design a School Database, then Student will be an
entity with attributes name, age, address etc. As Address is generally complex, it can
be another entity with attributes street name, pincode, city etc, and there will be a
relationship between them.
This model was introduced by E.F Codd in 1970, and since then it has been the most
widely used database model, infact, we can say the only database model used around
the world.
The basic structure of data in the relational model is tables. All the information related
to a particular type is stored in rows of that table.
Object-Relational Model
This model is a combination of an object-oriented database model and a relational
database model. Therefore, it blends the advanced functionalities of the object-oriented
model with the ease of the relational data model.
The data modeling process helps organizations to become more data-driven. This starts
with cleaning and modeling data.
A variety of other database models have been or are still used today.
A database built with the inverted file structure is designed to facilitate fast full text
searches. In this model, data content is indexed as a series of keys in a lookup table,
with the values pointing to the location of the associated files. This structure
can provide nearly instantaneous reporting in big data and analytics, for instance.
This model has been used by the ADABAS database management system of Software
AG since 1970, and it is still supported today.
Flat model
The flat model is the earliest, simplest data model. It simply lists all the data in a single
table, consisting of columns and rows. In order to access or manipulate the data, the
computer has to read the entire flat file into memory, which makes this model
inefficient for all but the smallest data sets.
Multidimensional model
Each cell in a dimensional database contains data about the dimensions tracked by the
database. Visually, it’s like a collection of cubes, rather than two-dimensional tables.
Semistructured model
In this model, the structural data usually contained in the database schema is embedded
with the data itself. Here the distinction between data and schema is vague at best. This
model is useful for describing systems, such as certain Web-based data sources, which
we treat as databases but cannot constrain with a schema. It’s also useful for describing
interactions between databases that don’t adhere to the same schema.
Context model
This model can incorporate elements from other database models as needed. It cobbles
together elements from object-oriented, semistructured, and network models.
Associative model
This model divides all the data points based on whether they describe an entity or an
association. In this model, an entity is anything that exists independently, whereas an
association is something that only exists in relation to something else.
Semantic model, which includes information about how the stored data relates to
the real world
XML database, which allows data to be specified and even stored in XML format
Named graph
Triplestore
In addition to the object database model, other non-SQL models have emerged in
contrast to the relational model:
The graph database model, which is even more flexible than a network model, allowing
any node to connect with any other.
The multivalue model, which breaks from the relational model by allowing attributes
to contain a list of data rather than a single data point.
The document model, which is designed for storing and managing documents or semi-
structured data, rather than atomic data.
Most websites rely on some kind of database to organize and present data to users.
Whenever someone uses the search functions on these sites, their search terms are
converted into queries for a database server to process. Typically, middleware connects
the web server with the database.
The broad presence of databases allows them to be used in almost any field, from online
shopping to micro-targeting a voter segment as part of a political campaign.
Data modeling makes it easier for developers, data architects, business analysts, and
other stakeholders to view and understand relationships among the data in a database
or data warehouse. In addition, it can:
There are three basic data modeling techniques. First, there is the Entity-Relationship
Diagram or ERD technique for modeling and the design of relational or traditional
databases. Second, the UML or Unified Modeling Language Class Diagrams is a
standardized family of notations for modeling and design of information systems.
Finally, the third is Data Dictionary modeling technique where tabular definition or
representation of data assets is done.
erwin Data Modeler is a data modeling tool based on the Integration DEFinition
for information modeling (IDEF1X) data modeling language that now supports
other notation methodologies, including a dimensional approach.
Enterprise Architect is a visual modeling and design tool that supports the
modeling of enterprise information systems and architectures as well as software
applications and databases. It’s based on object-oriented languages and
standards.
ER/Studio is database design software that’s compatible with several of today’s
most popular database management systems. It supports both relational and
dimensional data modeling.
Free data modeling tools include open source solutions such as Open
ModelSphere.
Classification of DBMS
The most popular data model in use today is the relational data model. Well-known
DBMSs like Oracle, MS SQL Server, DB2 and MySQL support this model. Other
traditional models, such as hierarchical data models and network data models, are still
used in industry mainly on mainframe platforms. However, they are not commonly
used due to their complexity. These are all referred to as traditional models because they
preceded the relational model.
In recent years, the newer object-oriented data models were introduced. This model is a
database management system in which information is represented in the form of objects
as used in object-oriented programming. Object-oriented databases are different from
relational databases, which are table-oriented. Object-oriented database management
systems (OODBMS) combine database capabilities with object-oriented programming
language capabilities.
The object-oriented models have not caught on as expected so are not in widespread
use. Some examples of object-oriented DBMSs are O2, ObjectStore and Jasmine.
Single user – As the name itself indicates it can support only one user at a time. It is
mostly used with the personal computer on which the data resides accessible to a single
person. The user may design, maintain and write the database programs.
Multiple users – It supports multiple users concurrently. Data can be both integrated
and shared,a database should be integrated when the same information is not need be
recorded in two places. For example a student in the college should have the database
containing his information. It must be accessible to all the departments related to him.
For example the library department and the fee section department should have
information about student’s database. So in such case, we can integrate and even
though database resides in only one place both the departments will have the access to
it.
Based on the sites over which network is distributed
Centralized database system – The DBMS and database are stored at the single site that
is used by several other systems too. We can simply say that data here is maintained on
the centralized server.
Parallel network database system – This system has the advantage of improving
processing input and output speeds. Majorly used in the applications that have query to
larger database. It holds the multiple central processing units and data storage disks in
parallel.
Distributed database system – In this data and the DBMS software are distributed over
several sites but connected to the single computer.
Further they are classified as
1.Homogeneous DBMS – They use same software but from the multiple sites. Data
exchange between the sites can be handled easily. For example, library information
systems by the same vendor ,such as Geac Computer corporation, use the same DBMS
software that allows the exchanges between various Geac library sites.
2.heterogeneous DBMS – They use different DBMS software for different sites but
there is a additional software that helps the exchange of the data between the sites.
Client-server database system – This system has two logical components namely
client and server. Clients are generally the personal computers or workstations whereas
servers are the large workstations, mini range computers or a main frame computer
system. The applications and tools of the DBMS run on the client platforms and the
DBMS software on the server. Both server and client computers are connected over the
network. We can relate it to client and server in real life to understand in a much better
way. Here the applications and tools act as a client send the requests for its services. The
DBMS processes these requests and returns the result to the client. Server handles jobs
that are common to many clients say database access and updates.
Online analytical processing(OLAP) DBMS – They use the operational data for tactical
and strategical decision making. They have limited users deal with huge amount of
data,complex queries.
Big data and analytics DBMS – To cope with big data new database technologies have
been introduced. One such is NoSQL (not only SQL) which abandons the well known
relational database scheme.
2.Enabled XML DBMS – Existing DBMS with facilities to store XML data and
structured data in integrated way.
Multimedia DBMS – Stores data such as text, images, audio, video and 3D games
which are usually stored in binary large object.
Sensor DBMS – Allows to manage sensor data, bio-metric and telematics data.
Mobile DBMS – Runs on the smartphones, tablets. It Handles the local queries.
Supports self management( no DBA).
Open source DBMS – Code is publicly available and can be extended by anyone,
popular for small business applications.