Professional Documents
Culture Documents
One of the main characteristics of the database approach is to support data abstraction so that
different users can perceive data at their preferred level of detail.
Data model:-
A data model is a collection of concepts that can be used to describe the structure of
a database and provides the necessary means and details to achieve this abstraction.
A collection of concepts that can be used to describe the structure of a database provides the
necessary means to achieve this abstraction. By structure of a database we mean the data types,
relationships, and constraints that apply to the data. Most data models also include a set of basic
operations for specifying retrievals and updates on the database.
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.
Categories of Data Models:
There are many kinds of data models. Some of the most common ones include:
Hierarchical database model
Relational model
Network model
Object-oriented database model
Entity-relationship model
Document model
Entity-attribute-value model
Star schema
The object-relational model, which combines the two that make up its name
Relational model:
The most common model, the relational model sorts data into tables, also
known as relations, each of which consists of columns and rows. Each column lists an attribute
of the entity in question, such as price, zip code, or birth date. Together, the attributes in a
Within the database, tables can be normalized, or brought to comply with normalization rules
that make the database flexible, adaptable, and scalable. When normalized, each piece of data is
atomic, or broken into the smallest useful pieces.
Relational databases are typically written in Structured Query Language (SQL). The model was
introduced by E.F. Codd in 1970.
Hierarchical model:
The hierarchical model organizes data into a tree-like structure, where
each record has a single parent or root. Sibling records are sorted in a particular order. That order
is used as the physical order for storing the database. This model is good for describing many
real-world relationships.
This model was primarily used by IBM’s Information Management Systems in the 60s and 70s,
but they are rarely seen today due to certain operational inefficiencies.
Network model:
The network model builds on the hierarchical model by allowing many-to-
many relationships between linked records, implying multiple parent records. Based on
mathematical set theory, the model is constructed with sets of related records. Each set consists
of one owner or parent record and one or more member or child records. A record can be a
member or child in multiple sets, allowing this model to convey complex relationships.
It was most popular in the 70s after it was formally defined by the Conference on Data Systems
Languages (CODASYL).
The object-oriented database model is the best known post-relational database model, since it
incorporates tables, but isn’t limited to tables. Such models are also known as hybrid database
models.
Diagramming is quick and easy with Lucidchart. Start a free trial today to start creating and
collaborating.
Object-relational model:
This hybrid database model combines the simplicity of the
relational model with some of the advanced functionality of the object-oriented database model.
In essence, it allows designers to incorporate objects into the familiar table structure.
Languages and call interfaces include SQL3, vendor languages, ODBC, JDBC, and proprietary
call interfaces that are extensions of the languages and interfaces used by the relational model.
Entity-relationship model:
This model captures the relationships between real-world
entities much like the network model, but it isn’t as directly tied to the physical structure of the
database. Instead, it’s often used for designing a database conceptually.
Here, the people, places, and things about which data points are stored are referred to as entities,
each of which has certain attributes that together make up their domain. The cardinality, or
relationships between entities, are mapped as well.
A common form of the ER diagram is the star schema, in which a central fact table connects to
multiple dimensional tables.
The term "database schema" can refer to a visual representation of a database, a set of rules that
govern a database, or to the entire set of objects belonging to a particular user. Read on to find
out more about database schemas and how they are used.
1.11 Data Model
A model is an abstraction process that hides superfluous details. Data modeling is used for
representing entities of interest and their relationship in the database.
Data model different types of Data Model
Data model is a collection of concepts that can be used to describe the structure of a database
which provides the necessary means to achieve the abstraction. The structure of a database
means that holds the data.
Data types,
Relationships
Constraints
Account –Table
Account-
Number Balance
A-101 1000.00
A-125 1200.00
A-456 5000.00
A-987 1234.00
A-111 3000.00
Customer Preethi and Rocky share the same account number A-111
Advantages
The main advantage of this model is its ability to represent data in a simplified format.
1. The process of manipulating record is simplified with the use of certain key attributes used to
retrieve data.
2. Representation of different types of relationship is possible with this model.
2. Network Model
The data in the network model are represented by collection of records and relationships among
data are represented by links, which can be viewed as pointers.
Advantages:
The representation of records is done using an ordered tree, which is natural method of
implementation of one–to-many relationships.
1. Proper ordering of the tree results in easier and faster retrieval of records.
2. Allows the use of virtual records. This result in a stable database especially when
modification of the data base is made.
4.0 Object-oriented Data Models
Several models have been proposed for implementing in a database system.
One set comprises models of persistent O-O Programming Languages such as C++ (e.g., in
OBJECTSTORE or VERSANT), and Smalltalk (e.g., in GEMSTONE).
Additionally, systems like O2, ORION (at MCC – then ITASCA), IRIS (at H.P.-used in
Open OODB).
5.0 Object-Relational Models
Most Recent Trend. Started with Informix
Universal Server.
Relational systems incorporate concepts from object databases leading to object-relational.
Object Database Standard: ODMG-93, ODMG-version 2.0,ODMG-version 3.0.
Exemplified in the latest versions of Oracle-10i,DB2, and SQL Server and other DBMSs.
Database Schema:
A database schema is the skeleton structure or visual representation that
represents the logical view of the entire database. It defines how the data is organized and how
the relations among them are associated. It formulates all the constraints that are to be applied
on the data.
A database schema does not contain any data or information. It formulates all the
constraints that are to be applied on the data.
A database schema defines its entities and the relationship among them. It contains a descriptive
detail of the database, which can be depicted by means of schema diagrams. It’s the database
designers who design the schema to help programmers understand the database and make it
useful.
Database Instance:
The data stored in database at a particular moment of time is called instance of database.
The data in the database at a particular moment in time is called a database state or
snapshot. It is also called the current set of occurrences or instances in the database.
In a given database state, each schema construct has its own current set of instances.
The DBMS stores the descriptions of the schema constructs and constraints also called
metadata in the DMBS catalog so that DBMS software can refer to the schema
whenever it needs to.
It is important that we distinguish these two terms individually. Database schema is the skeleton
of database. It is designed when the database doesn't exist at all. Once the database is
operational, it is very difficult to make any changes to it. A database schema does not contain
any data or information.
A database instance is a state of operational database with data at any given time. It contains a
snapshot of the database. Database instances tend to change with time. A DBMS ensures that its
every instance (state) is in a valid state, by diligently following all the validations, constraints,
and conditions that the database designers have imposed.
A database state at a specific time defined through the currently existing content and
relationship and their attributes is called a database instance
Internal schema:
The internal level has an internal schema, which describes the physical
storage structure of the database. The internal schema uses a physical data model and describes
the complete details of data storage and access paths for the database.
[External Level: An external level specifies a view of the data in terms of conceptual level
tables. Each external level view is used to cater the needs of a particular category of users. For
Example, FACULTY of a university is interested in looking course details of students,
STUDENTS are interested in looking all details related to academics, accounts, courses and
hostel details as well. So, different views can be generated for different users.]
Conceptual schema:
The conceptual level has a conceptual schema, which describes the
structure of the whole database for a community of users. The conceptual schema hides the
details of physical storage structures and concentrates on describing entities, data types,
relationships, user operations, and constraints. Usually, a representational data model is used to
describe the conceptual schema when a database system is implemented. This implementation
conceptual schema is often based on a conceptual schema design in a high-level data model.
[Conceptual Level: At conceptual level, data is represented in the form of various database
tables. For Example, STUDENT database may contain STUDENT and COURSE tables which
will be visible to users but users are unaware about their storage.]
External schema:
The external or view level includes a number of external
schemas or user views. Each external schema describes the part of the database that a particular
user group is interested in and hides the rest of the database from that user group. As in the
previous level, each external schema is typically implemented using a representational data
model, possibly based on an external schema design in a high-level data model.
[At physical level, the information about location of database objects in data store is kept.
Various users are DBMS are unaware about the locations of these objects.]
Three schema architecture divided into three levels. They are,
1. Physical Level
2. Conceptual Level
3. External Level
2. Conceptual Level
Conceptual level describes the structure of the whole database for a group of users.
It is also called as the data model.
Conceptual schema is a representation of the entire content of the database.
This schema contains all the information to build relevant external records.
It hides the internal details of physical storage.
3. External Level
External level is related to the data which is viewed by individual end users.
This level includes a no. of user views or external schemas.
This level is closest to the user.
External view describes the segment of the database that is required for a particular user
group and hides the rest of the database from that user group.
Data Independence:
Data independence is ability to modify a schema definition in one
level without affecting a schema definition in the next higher level.
[data independence The facility to modify a database schema (logical or storage schema) with
no consequent requirement to modify user views or programs interacting with the database nor
any need to reload data. To provide data independence has been a main motivation for the
development of database management software.]
There are two levels of data independence:
1. Physical Data Independence
2. Logical Data Independence
[All the schemas are logical, and the actual data is stored in bit format on the disk. Physical data
independence is the power to change the physical data without impacting the schema or logical
data.For example: in case we want to change or upgrade the storage system itself − suppose we
want to replace hard-disks with SSD − it should not have any impact on the logical data or
schemas. ]
Difference between Physical data independence and logical data
independence:
Logical data independence is the one which has power (Ability) to change logical schema
without changing external schema or application. Logical data independence in any database
applications relates to views where we can only view the data rather than modifying data.
Example:
Adding or removing Entities, relationships, attributes, to conceptual schema is possible without
doing or performing any alteration in the external schemas or records.
Renaming attributes or tables does not affect any change in external schema.
Database Languages:
Database Languages are used to create and maintain database on computer. (Database languages
are used for read, update and store data in a database.).
There are several such languages that can be used for this purpose such as Oracle, MySQL, MS
Access, dBase, FoxPro, Sybase etc.
Database languages can be categorized into four types. They are,
1. Database Definition Language (DDL)
2. Data Manipulation Language (DML)
3. Data Control Language (DCL)
4. Storage Definition Language (SDL)
5. View Definition Language(VDL)
[The language used to define the data in the database is called as Data - Definition Language
(DDL). In simple words, Data Definition Languages is used to create the database, alter the
database and delete the database.]
The lists of tasks that come under DDL:
CREATE - used to create objects in the database
ALTER - used to alters the structure of the database
DROP - used to delete objects from the database
TRUNCATE - used to remove all records from a table, including all spaces allocated for the
records are removed
COMMENT - used to add comments to the data dictionary
RENAME - used to rename an object
DBMS Interfaces:
A database management system (DBMS) interface is a user
interface which allows for the ability to input queries to a database without using the query
language itself. A DBMS interface could be a web client, a local client that runs on a desktop
computer, or even a mobile app.
Various types of DBMS interfaces are,
1. Menu-Based Interfaces for Web Clients or Browsing
2. Forms-Based Interfaces
3. Graphical User Interfaces
4. Natural Language Interfaces
5. Interfaces for Parametric Users
6. Interfaces for the DBA
Menu-Based Interfaces for Web Clients or Browsing:
These interfaces allow
users to present lists of options, called menus, which show the way the user through the
formulation (send) of a request.
Menus do away with the need to memorize the specific commands and syntax of a query
language; rather, the query is composed step by step by picking options from a menu that is
displayed by the system.
Pull-down menus are a very popular technique in Web-based user interfaces. They are also often
used in browsing interfaces, which allow a user to look through the contents of a database in an
exploratory and unstructured manner.
Forms-Based Interfaces:
A forms-based interface displays a form to each user. Users can fill
out all of the form entries to insert new data, or they fill out only certain entries, in which case
the DBMS will retrieve matching data for the remaining entries.
Forms are usually designed and programmed for naive users as interfaces to canned transactions.
Many DBMSs have forms specification languages, which are special languages that help
programmers, specify such forms.
Graphical User Interfaces:
A graphical user interface (GUI) typically displays a schema
to the user in diagrammatic form. The user can then specify a query by manipulating the
diagram. In many cases, GUIs utilize both menus and forms. Most GUIs use a pointing device,
such as a mouse, to pick certain parts of the displayed schema diagram.
Natural Language Interfaces:
These interfaces accept requests written in English or some
other language and attempt to "understand" them. A natural language interface usually has its
own "schema," which is similar to the database conceptual schema, as well as a dictionary of
important words.
The natural language interface refers to the words in its schema, as well as to the set of standard
words in its dictionary, to interpret the request. If the interpretation is successful, the interface
generates a high-level query corresponding to the natural language request and submits it to the
DBMS for processing; otherwise, a dialogue is started with the user to clarify the request.
Interfaces for Parametric Users:
Parametric users, such as bank tellers, often have a
small set of operations that they must perform repeatedly. Systems analysts and programmers
design and implement a special interface for each known class of naive users. Usually, a small
set of abbreviated commands is included, with the goal of minimizing the number of keystrokes
required for each request.
The figure is divided into two halves. The top half of the figure refers to the various users of the
database environment and their interfaces. The lower half shows the internals of the DBMS
responsible for storage of data and processing of transaction.
The database and the DBMS catalog are usually stored on disk. Access to the disk is primarily
controlled by operating system(OS).which inclues disk input/Output. A higher level stored data
manager module of DBMS controls access to DBMS information that is stored on the disk.
If we consider the top half of the figure, It shows interfaces to DBA staff, casual users,
application programmers and parametric users.
The DDL compiler processes schema definitions, specified in the DDL, and stores the
description of the schema in the DBMS Catalog..The catalog includes information such as names
and sizes of the sizes of the files, data types of data of data items. Storage details of each file,
mapping information among schemas and constraints.
Casual users and persons with occasional need of information from database interact using some
of interface which is interactive query interface. The queries are parsed, analyzed for correctness
of the operations for the model, the names of the data elements and so on by a query compiler
that compiles them into internal form. The internal query is subjected to query optimization..The
query optimizer is concerned with rearrangement and possible recording of operations,
eliminations of redundancies.
Application programmer writes programs in host languages. The precompiler extracts DML
commands from an application program.
Various Components of Database Management System (DBMS)
Query Processor
Machine only understand low level language, so it is the task of query
processor to convert user’s queries in the series of low level instruction. Then after, it sends these
instructions to database manager for execution. There are various component of of query
processor.
DDL Complier:
It records the DDL statements into set of tables containing data dictionary. It
coverts DDL statement into object form from source form.
DML Complier:
It converts DML statements into low level instructions that are more easy to
understand by query evaluation engine.
Query Evaluation Engine:
Queries generated by DML compiler are executed in Query
evaluation Engine.
Database Manager:
Database manager components issue the interface between low level
data, application program and queries. It is responsible for the backup and recovery operations of
database. Also it controls the consistency and integrity of data. Security is also performed by the
database manager.
Authority and integrity manager:
Authority manager is responsible for checking the
authority of users to access and use information in database. Integrity manager check the
integrity constrains like various keys (Primary, unique etc.)
Data Structure
There are following data structures are required by DBMS.
Data Files: These are the files that stored data base.
Data Dictionary: Data dictionary carries the data about data means it stores the meta data of
data structure.
Access Acids: Acid properties are used to improve the performance of database management
system. They make the search operations very fast.
Statistical Data: It stores some information that are used by query processor to choose the best
way to execute queries.
So all these were the Various Components of Database Management System (DBMS). If you
have any problem regarding this topic then please comment below.
Transaction Manager Component: It handle atomicity and concurrency of transactions
and consistency and durability of the databases
1. File Manager- File manager manages the file space and it takes care of the structure of the
file. It manages the allocation space on disk storage and the data structures used to
represent info stored on other media.
2. Buffer Manager – It transfers blocks between disk (or other devices) and Main Memory.
A DMA (Direct Memory Access) is a form of Input/Output that controls the exchange of
blocks process. When a processor receives a request for a transfer of a block, it sends it to
the DMA Controller which transfers the block uninterrupted.
3. Disk Manager- The block requested by the file manager is transferred by the Disk
Manager.
A backup utility creates a backup copy of the database, usually by dumping the entire
database onto tape or other mass storage medium. The backup copy can be used to restore the
database in case of catastrophic disk failure. Incremental backups are also often used, where only
changes since the previous backup are recorded. Incremental backup is more complex, but saves
storage space.
Database storage reorganization:
This utility can be used to reorganize a set of database
files into different file organizations, and create new access paths to improve performance.
Performance monitoring:
Such a utility monitors database usage and provides statistics to
the DBA. The DBA uses the statistics in making decisions such as whether or not to reorganize
files or whether to add or drop indexes to improve performance.
Other utilities may be available for sorting files, handling data compression, monitoring access
by users, interfacing with the network, and performing other functions.
Tools, Application Environments, and Communications Facilities:
CASE Tools – used in the design phase to help speed up the development process.
Data dictionary system – stores catalog information about schemas and constraints, as
well as design decisions, usage standards, application program descriptions, user
information. Also called an information repository. Can be accesses directly by DBA or
users when needed.
Application development environments – (i.e. JBuilder) provide environment for
developing database applications, and include facilities to help in database design, GUI
development, querying and updating and application development.
Communication software – allow users at remote locations to access the database
through computer terminals, workstations or personal computers. Connected to the
database through data communications hardware such as phone lines, local area networks
etc.