0% found this document useful (0 votes)
25 views49 pages

CHAPTER 1-Introduction To DBMS - Final

Uploaded by

silkytanu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views49 pages

CHAPTER 1-Introduction To DBMS - Final

Uploaded by

silkytanu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 49

Introduction to DBMS

Dr. Leena Das


SCE,Campus-15
Contents
• Introduction to database system
• Database –DBMS Definition
• Approaches to build a database
• Data Models
• Three schema architecture of a database
• Challenges in building a DBMS
• Various Components of DBMS
What is the difference between data
and information?
• Data
-Raw facts, unprocessed facts
-Refers to what is actually stored
• Information
-Result of processing raw data
-Refers to meaning of the data, understood by
the user
• Data management focuses on the generation,
storage & retrieval of data
What are Limitations of File-Processing
Systems?

• Redundancy problem
-Repetitive data
• Data-inconsistency problem
-Incorrectness of data
• Lack of data integration
- Complex and time consuming
What is a Database?
• Database is a collection of interrelated data
• Database is a shared, integrated computer structure that stores:
End- user data:
-raw facts of interest to the end-user
Meta data:
-through which the end-user data are integrated & managed.
-The metadata provides a description of the data characteristics and
the set of relationships that link the data found within the database.
• Database is an organized collection of data of an organization or
enterprise.
What is a DBMS?
• DBMS (Database Management System)
• It is a collection of programs that manages structure & controls
access to the data stored in the database.
• It includes tools to add, modify or delete data from the database,
ask questions (or queries) about the data stored in the database
and produce reports.
• DBMS serves as the intermediary between the user & the
database.
Types of Database
* Depending on the number of users accessing the database:
1. Single-user database system:
• It supports only one user at a time.
• When a single-user database runs on a personal computer, it
is also called a desktop database system.
2. Multi-user database system:
• It supports multiple users at the same time.
• When a multi-user database supports relatively small
number of users, it is called as a workgroup database
system.
• If the database is used by many users across globe, it is
known as enterprise database system .
Types of Database

* Depending on the location of the database:


1. Centralized database system:
• It supports data located at a single site or single place
2. Distributed database system:
• It supports data distributed across several different
sites.
• Here, the same database can be replicated and stored
in another computer so that when ever the original
server goes down; the data can be available to the
user from the replicated data from other servers.
Advantages of DBMS over File System
• Controlling Redundancy & Inconsistency
• Allows Data Sharing
• Restricting Unauthorized Access
• Providing Storage Structures for efficient query
processing
• Providing Backup & Recovery
• Providing multiple user interfaces
• Enforcing Integrity Constraints
• Solving data isolation

DBMS VS RDBMS
DBMS RDBMS Normalization is not present. is present.

RDBMS supports
DBMS does not support distributed database.
RDBMS stores data in distributed database.
DBMS stores data as file.
tabular form.
It deals with large
It deals with small quantity of data.
amount of data.
Multiple data elements
Data elements need to
can be accessed at the Keys and indexes do not
access individually. Data redundancy is common in this model.
same time. allow Data redundancy.

It is used for small organization and deal with It is used to handle


Data is stored in the form small data. large amount of data.
No relationship between
of tables which are related
data.
to each other. Not all Codd rules are satisfi ed.
All 12 Codd rules are
satisfi ed.

More security measures


Security is less
provided.

It supports multiple
It supports single user.
users.

Data fetching is fast


Data fetching is slower for the large amount of
because of relational
data.
approach.

There exists multiple


The data in a DBMS is subject to low security
levels of data security
levels with regards to data manipulation.
in a RDBMS.

Higher software and


Low software and hardware necessities.
hardware necessities.

Examples: MySQL,
Examples: XML, Window Registry, Forxpro, PostgreSQL, SQL Server,
dbaseIIIplus etc. Oracle, Microsoft
Access etc.
Data Model
• Data model is a collection of conceptual tools for
describing data, data relationships, data
semantics and consistency constraints.
• That means a data model provides a way to
describe the design of a database.
• It is relatively simple representation, usually
graphical, of complex real-world data structures.
• Data modeling is considered as the most
important part of the database design process.
Basic Building Blocks of Data Model
Entity
• An entity is anything about which data are to be collected and
stored.
• An entity represents a particular type of object in the real world.
Entity Set
• Set of entities of the same type that share the same properties are
called as entity sets.
Attribute
• An attribute is a characteristic of an entity.
Constraints
• A constraint is a restriction placed on the data.
• Constraints are important because they help to ensure data integrity.
Relationship
Basic Building Blocks of Data Model
Different types of relationship are:
• One-to-One (1:1) Relationship:

• One-to-Many (1:M) Relationship:

• One-to-Many (M:N) Relationship:


Types of Data Model used
• Hierarchical Model
• Network Model
• Relational Model
• Entity-Relationship(ER) Model
• Object-Oriented(OO) Model
• Object-Relational(OR) Model
• Semi-structured Model
Hierarchical Data Model
• The hierarchical model was developed in the 1960s to manage
large amount of data for complex manufacturing projects.
• Its basic logical structure is represented by an upside-down tree.
• The hierarchical structure contains levels of segments.
• It depicts a set of 1:M relationships between a parent and its
children segments.
Hierarchical Data Model
Advantages:
• Efficient storage for data that have a clear hierarchy
• Parent/child relationship promotes conceptual simplicity & data
integrity.
• It is efficient with 1:M relationships.
• It promotes data sharing.
Disadvantages:
• It is complex to implement.
• It is difficult to manage.
• There are implementation limitations, that means it can’t
represent M:N relationships.
• There is no DDL (Defines the data structure that make up a
database) and DML (Modifies the contents of tables).
Network Data Model
• The network model was created to represent complex
data relationships more effectively than the hierarchical
model to improve database performance, and to impose
a database standard.
• A user perceives the network model as a collection of
records in 1:M relationships.
Network Data Model
Advantages:
• It represents complex data relationships better than hierarchical models
• It handles more relationship types, such as M: N and multi-parent
• Data access is more flexible than hierarchical model
• Improved database performance
• It includes DDL and DML
Disadvantages:
• System complexity limits efficiency.
• Navigational system yields complex implementation and management
• Structural changes require changes in all application programs.
• Database contains a complex array of pointers that thread through a set of
records.
• Put heavy pressure on programmers due the complex structure.
• Networks can become chaotic unless planned carefully.
Relational Data Model
• The relational model was introduced by E. F. Codd in 1970.
• This data model is implemented through RDBMS; which is
easier to understand and implement.
• The most important advantage of the RDBMS is its ability to
hide the complexities of the relational model from the user.
• Another reason for the relational data model’s rise to
dominance is its powerful and flexible query language.
• Generally, SQL is used for this purpose.
Relational Data Model
Advantages:
• Changes in a table’s structure do not affect data access or
application programs.
• Tabular view substantially improves conceptual simplicity,
thereby promoting easier database design, implementation,
management and use.
• Have referential integrity controls ensure data consistency.
• RDBMS isolates the end-users from physical level details and
improves implementation and management simplicity
Disadvantages:
• Conceptual simplicity gives relatively untrained people the tools
to use a good system poorly.
• It may promote islands of information problems as individuals
Entity-Relationship(ER) Model
• Peter Chen first introduced the ER data model in 1976; it was
the graphical representation of entities and their relationships
in a database structure that quickly became popular.
• Thus, the ER-model has become a widely accepted standard
for data modeling
• ER models are normally represented in an ER diagram
Entity-Relationship(ER) Model
Advantages:
• Visual modeling yields exceptional conceptual simplicity.
• Visual representation makes it an effective
communication tool.
• It is integrated with dominant relational model.
Disadvantages:
• There is limited constraint representation.
• There is limited relationship representation.
• There is no DML.
• Loss of information content when attributes are
removed from entities to avoid crowded displays.
Object-Oriented(OO) data Model
• Both data and their relationships are contained in a single structure
called an object.
• Like the relational model’s entity, an object is described by its
factual content.
• But quite unlike an entity, an object includes information about
relationships between the facts within the object, as well as
information about its relationships with other Attributes describe
the properties of an object.
• Objects that share similar characteristics are grouped in classes.
• Thus, a class is a collection of similar objects with shared structure
(attributes) and methods.
Object-Oriented(OO) Model.
Advantages:
• Semantic content is added
• Support for complex objects
• Visual representation includes semantic content
• Inheritance promotes data integrity
Disadvantages:
• It is a complex navigational system
• High system overheads slow transactions
• Slow development of standards caused vendors to supply
their own enhancements, thus eliminating a widely
Object-Relational (OR) Data Model
• The object-oriented data model is somewhat spherical in nature,
allowing access to unique elements anywhere within a database
structure, with extremely high performance.
• But, it performs extremely poorly when retrieving more than a single
data item
• The relational data model is best suited for retrieval of groups of
data, but can also be used to access unique data items fairly
efficiently
• Thus, by combining the features of relational data model and object-
oriented data model, object-relational data model was created
Semi-structured Model
• The semi-structured data model permits the
specification of data where individual data items
of the same type may have different sets of
attributes.
• The XML (Extensible Markup Language) is widely
used to represent semi-structured data.
• It supports unstructured data
Level Abstraction of Database
• The goal of the 3-level abstraction is to separate the user applications
and the physical database.
• It deals with the data, the relationship between them and the
different access methods implemented on the database.
• The logical design of a database is called a schema.
Level Abstraction of Database
1.External/View Level
• The external level includes a number of external schemas
or user views.
• Each external schema or user view describes the part of the
database that a particular user group is interested in and
hides the details of the database from that user group.
2.Conceptual Level
• 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 and constraints.
Level Abstraction of Database
• It represents global view of the entire database.
• For a database, there is only one conceptual schema
available.
3. Internal Level
• The internal level has an internal schema, which describes
the physical storage structure of the database system.
• Like conceptual schema, there is only one internal schema
available for a database.
• It is the one which is closest to physical storage.
• The internal schema not only defines the various stored
record types, but also specifies what indices exist, how
stored fields are represented.
Physical and Logical Data Independence

• In a database system based on the 3-level


architecture, each user group refers only to its own
external schema.
• The process of transforming requests and results
between different levels are called mapping.
1. Conceptual/Internal Mapping
• It defines the correspondence between the
conceptual view and the stored database.
• Physical Data Independence indicates that the
internal schema can be changed without any change
Physical and Logical Data Independence

2. External/Conceptual Mapping
• It defines the correspondence between a
particular external view and the conceptual view.
• Logical Data Independence indicates that the
conceptual schema can be changed without
affecting the existing external schemas.
Types of Database Users
1. Naive Users
• They are the normal or unsophisticated users who
interact with the system by invoking application
programs that have been written previously.
• The typical user interface for naive users is a form
interface, where the user can fill in appropriate fields of
the form.
2. Application Programmers
• They are computer professionals who write application
programs to access data from the database.
• Application programmers can use different tools to
develop user interfaces
Types of Database Users
3. Sophisticated Users
• They interact with the system without creating any
application program.
• Rather, they form their requests in a database query
language and submit each such query to a query
processor.
• Analysts who submit queries to explore data in the
database fall in this category
4. Specialized Users
• They are sophisticated users who write specialized
database applications that don’t fit into the
Roles of a Database Administrator(DBA)
• The person who has central control of the whole
database system is called DBA.
• The DBA coordinates all the activities of the database
system.
The roles of DBA are:
• DBA creates the original database schema by
executing a set of DDL statements
• DBA defines and controls the access methods for the
different users
• DBA carries out changes to the schema and physical
organization to reflect the changing needs of the
Roles of a Database Administrator(DBA)
The roles of DBA are:
• By granting different types of authorization, DBA can
regulate which parts of the database various users can
access
• DBA specifies the different types of constraints to
different tables or objects
• DBA is responsible for the periodically backing up the
database
• DBA ensures that enough free disk space is available for
normal operations and upgrading disk space as required
• DBA monitors the jobs running on the database and
ensures that the performance is not degraded by very
Database Architecture
Components of Database
The functional components of a database system can
be broadly divided into:
• The storage manager is important because
databases typically require a large amount of storage
space
• The query processor is important because it helps
the database system simplify and facilitate access to
data
• The overall computer system consists of four
modules as:
-Hardware, Operating system, File management
Storage Manager
• A storage manager is a program module that provides the
interface between the low-level data stored in the
database and the application programs and queries
submitted to the system.
• The storage manager is responsible for the interaction
with the file manager.
• Storage manager is responsible for storing, retrieving and
updating data in the database
The storage manager components include:
1. Authorization and Integrity Manager:
• This module tests for the satisfaction of integrity
constraints and checks the authority of users to access
Storage Manager
2. Transaction Manager:
• Transaction manager ensures that the database remains in a
consistent (correct) state despite system failures and
concurrent transaction executions proceed without
conflicting
3. File Manager:
• This module manages the allocation of space on disk storage
and data structures used to represent information stored on
the disk.
4. Buffer Manager:
• Buffer manager is responsible for fetching data from the disk
storage into main memory.
• The buffer manager is a critical part of the database system
Storage Manager
The storage manager implements data structures as part of
the physical system implementations:
• Data files: These are files in the physical memory used to
store the database itself
• Data Dictionary: Data dictionary stores the metadata
(data about data) that provides the information about the
definitions of the data items and their relationships,
authorizations, and usage statistics.
-In addition, any changes made to the physical structure
of the database are automatically recorded in the data
dictionary
• Indices: Indices are used to provide faster access to data
Query Processor
• The work of query processor is to execute the query
successfully
• The major components of query processor include:
1. DDL Interpreter: This is the interpreter used to interpret DDL
statements and records the definitions in the data dictionary
2. DML Compiler: DML compiler translates the DML statements
in a query language into an evaluation plan consisting of low-
level instructions that the query evaluation engine
understands.
- When a user wants to perform a DML operation, the data
dictionary has to be checked for the validation purpose
3. Query Evaluation Engine: This module executes the low-level
instructions generated by the DML compiler
MCQ
Which is not TRUE?
I. Storage manager is required for DBMS.
II.Query processor is required for DBMS.
III. Data dictionary is a part of query evaluation engine.
IV. Authorization and integrity manager is essential for
DBMS.
A. I
B. II
C. III
D. IV
Application Architecture used for database

• Client machines are those on which the remote


database users work.
• Server machines are those on which the database
system runs
• Two types:
1. 2-Tier Architecture:
• Here, the application is partitioned into a component
that resides at the client machine, which invokes
database system functionality at the server machine
through query language.
• The two tiers are: Data server and Client application
Application Architecture used for database
2. 3-Tier Architecture:
• Here, the client machine acts as a front end and
doesn’t contain any direct database calls.
• The client end communicates with an application
server, usually via a form interfaces.
• The application server in turn communicates
with a database system to access data.
• The 3-tier applications are more appropriate for
large applications, and the applications that run
on the web
Application Architecture used for database
Disadvantages of Database Processing
The major disadvantages are:
1. Larger file size:
• In order to support all the complex functions that it
provides to users, a DBMS must be a large program
that occupies a great amount of disk space as well as
a substantial amount of internal memory.
2. Increased Complexities:
• The complexity and breadth of the functions provided
by a DBMS make it a complex product.
• Users of the database system must learn a great deal
to understand the features of the system in order to
take full advantages of it
Disadvantages of Database Processing
The major disadvantages are:
3. Greater Impact of Failure:
• If several users are sharing the same database, a failure
on the part of any one user that damages the database
in some way might affect all the other users connected
4. More difficult recovery:
• The database must first be restored to the condition it
was in when it was last known to be correct, any
updates made by users since that time must be redone.
• The greater the number of users involved in updating
the database, the more complicated this task becomes
Questions
Q1. The logical design of a database is called --------.
Q2. ------------ model represents an entity set as a class.
Q3. ____is set of all possible data values.
Q4. To access information from a database, you need a _____.
Q5. Data dictionary is not maintained by the user – justify.
Q6. Explain the importance of logical design before physical
design of the database.
Q7. Differentiate between data, database and DBMS.
Q8. What is the use of data dictionary in DBMS.
Q9. How data integrity is different from data security?
Q10. What are the disadvantages of database processing?
Q11. What are the advantages of Entity-Relationship data model?
Q12. _________ is an association between entities.
Questions
Q13. Discuss the advantages and disadvantages of Entity-
Relationship model, Relational model and Object-oriented
model. Also, justify the statement: “Normally, ER diagram is
constructed before the construction of Relational schema
and Object-oriented schema”.
Q14. Describe three schema architecture. Why do we need
mapping between schema levels? Differentiate between
logical and physical data independence.
Q15. Draw and explain each component of database
architecture.
Q16. Note the advantages and disadvantages of file system and
DBMS.
Q17. What are the roles of data analyst and application

You might also like