You are on page 1of 68

ADVANCE

DATABASE
MANAGEMENT
SYSTEM
Sukesh Kumar Bhagat
Assistant Professor
DBUU, Dehradun
INTRODUCTION
TO DATABASE
SYSTEM
A database system is a structured collection of data organized to provide efficient retrieval, storage, and
management of information. It is a crucial component in modern computing, used in a wide range of
applications to store and retrieve data in a structured and organized manner.
DATA
 Data is a collection of a distinct small unit of information.
 It can be used in a variety of forms like text, numbers, media, bytes, etc.
 it can be stored in pieces of paper or electronic memory, etc.
 Word 'Data' is originated from the word 'datum' that means 'single piece of information.' It is
plural of the word datum.
 In computing, Data is information that can be translated into a form for efficient movement
and processing. Data is interchangeable.
DATABASE
 A database is an organized collection of data, so that it can be easily accessed and managed.
 You can organize data into tables, rows, columns, and index it to make it easier to find relevant
information.
 Database handlers create a database in such a way that only one set of software program provides access
of data to all the users.
 The main purpose of the database is to operate a large amount of information by storing, retrieving, and
managing data.
 There are many dynamic websites on the World Wide Web nowadays which are handled through
databases. For example, a model that checks the availability of rooms in a hotel. It is an example of a
dynamic website that uses a database.
 There are many databases available like MySQL, Sybase, Oracle, MongoDB, Informix, PostgreSQL, SQL
Server, etc.
 Modern databases are managed by the database management system (DBMS).
 SQL or Structured Query Language is used to operate on the data stored in a database. SQL depends on
relational algebra and tuple relational calculus.
 A cylindrical structure is used to display the image of a database.
EVOLUTION OF DATABASES
File-Based
 1968 -File-Based database were introduced. In file-based databases, data was maintained in a
flat file. Though files have many advantages, there are several limitations.
 One of the major advantages is that the file system has various access methods, e.g.,
sequential, indexed, and random.
 It requires extensive programming in a third-generation language such as COBOL, BASIC.
HIERARCHICAL DATA MODEL
 1968-1980 was the era of the Hierarchical Database. Prominent hierarchical database model was
IBM's first DBMS. It was called IMS (Information Management System).
 In this model, files are related in a parent/child manner.
 Below diagram represents Hierarchical Data Model. Small circle represents objects.

 Like file system, this model also had some limitations like complex implementation, lack
structural independence, can't easily handle a many-many relationship, etc.
NETWORK DATA MODEL
 Charles Bachman developed the first DBMS at Honeywell called Integrated Data Store
(IDS).
 In this model, files are related as owners and members, like to the common network model.
Network data model identified the following components:
• Network schema (Database organization)
• Sub-schema (views of database per user)
• Data management language (procedural)
This model also had some limitations like system complexity and difficult to design and
maintain.
RELATIONAL DATABASE
 1970 - Present:
 In 1970, the relational model was proposed by E.F. Codd.
 Relational database model has two main terminologies called instance and schema.
 The instance is a table with rows or columns
 Schema specifies the structure like name of the relation, type of each column and name
 This model uses some mathematical concept like set theory and predicate logic.
 The first internet database application had been created in 1995.
 During the era of the relational database, many more models had introduced like object-
oriented model, object-relational model, etc.
CLOUD DATABASE
Cloud database facilitates you to store, manage, and retrieve their structured, unstructured data via a
cloud platform. This data is accessible over the Internet. Cloud databases are also called a database as
service (DBaaS) because they are offered as a managed service.
Some best cloud options are:
• AWS (Amazon Web Services)
• Snowflake Computing
• Oracle Database Cloud Services
• Microsoft SQL server
• Google cloud spanner

Advantages of cloud database


 Lower costs: Generally, company provider does not have to invest in databases. It can maintain and
support one or more data centers.
 Automated: Cloud databases are enriched with a variety of automated processes such as recovery,
failover, and auto-scaling.
 Increased accessibility: You can access your cloud-based database from any location, anytime. All
you need is just an internet connection.
NOSQL DATABASE
A NoSQL database is an approach to design such databases that can accommodate a wide variety of data models. NoSQL
stands for "not only SQL." It is an alternative to traditional relational databases in which data is placed in tables, and data
schema is perfectly designed before the database is built.
 NoSQL databases are useful for a large set of distributed data.

Some examples of NoSQL database system with their category are:


• MongoDB, CouchDB, Cloudant (Document-based)
• Memcached, Redis, Coherence (key-value store)
• HBase, Big Table, Accumulo (Tabular)
ADVANTAGE OF NOSQL DISADVANTAGE OF NOSQL
 High Scalability  Open source

 NoSQL is an open-source database, so there is no reliable standard for NoSQL


 NoSQL can handle an extensive amount of data because
yet.
of scalability. If the data grows, NoSQL database scale it
 Management challenge
to handle that data in an efficient manner.
 Data management in NoSQL is much more complicated than relational
 High Availability databases. It is very challenging to install and even more hectic to manage daily.
 NoSQL supports auto replication. Auto replication makes  GUI is not available

it highly available because, in case of any failure, data  GUI tools for NoSQL database are not easily available in the market.
replicates itself to the previous consistent state.  Backup

 Backup is a great weak point for NoSQL databases. Some databases, like
MongoDB, have no powerful approaches for data backup.
THE OBJECT-ORIENTED DATABASES
 The object-oriented databases contain data in the form of object and classes. Objects are the real-
world entity, and types are the collection of objects. An object-oriented database is a combination of
relational model features with objects oriented principles. It is an alternative implementation to that of
the relational model.
 Object-oriented databases hold the rules of object-oriented programming. An object-oriented database
management system is a hybrid application.
 The object-oriented database model contains the following properties.

Object-oriented programming properties Relational database properties


•Objects •Atomicity
•Classes •Consistency
•Inheritance •Integrity
•Polymorphism •Durability
•Encapsulation •Concurrency
•Query processing
GRAPH DATABASES
 A graph database is a NoSQL database. It is a graphical representation of data. It contains
nodes and edges. A node represents an entity, and each edge represents a relationship between
two edges. Every node in a graph database represents a unique identifier.
 Graph databases are beneficial for searching the relationship between data because they
highlight the relationship between relevant data.

 Graph databases are very useful when the database contains a complex relationship and
dynamic schema.
 It is mostly used in supply chain management, identifying the source of IP telephony.
DBMS (DATA BASE MANAGEMENT SYSTEM)
 Database management System is software which is used to store and retrieve the database.
For example, Oracle, MySQL, etc.; these are some popular DBMS tools.
• DBMS provides the interface to perform the various operations like creation, deletion,
modification, etc.
• DBMS allows the user to create their databases as per their requirement.
• DBMS accepts the request from the application and provides specific data through the
operating system.
• DBMS contains the group of programs which acts according to the user instruction.
ADVANTAGE OF DBMS
• It provides security to the database.  DISADVANTAGE OF DBMS
 Controls redundancy  Size
 It stores all the data in a single database file, so it can
control data redundancy.  It occupies large disk space and large memory to run
 Data sharing efficiently.
 An authorized user can share the data among multiple users.  Cost
 Backup  DBMS requires a high-speed data processor and
 It providesBackup and recovery subsystem. This recovery larger memory to run DBMS software, so it is costly.
system creates automatic data from system failure and
restores data if required.
 Complexity
 Multiple user interfaces  DBMS creates additional complexity and
 It provides a different type of user interfaces like GUI, requirements.
application interfaces.
RDBMS (RELATIONAL DATABASE MANAGEMENT
SYSTEM)
 The word RDBMS is termed as 'Relational Database Management
System.' It is represented as a table that contains rows and column.
 RDBMS is based on the Relational model; it was introduced by E. F.
Codd.
A relational database contains the following components:
• Table
• Record/ Tuple
• Field/Column name /Attribute
• Instance
• Schema
• Keys
 An RDBMS is a tabular DBMS that maintains the security, integrity,
accuracy, and consistency of the data.
RDBMS (RELATIONAL DATABASE MANAGEMENT
SYSTEM)
 The word RDBMS is termed as 'Relational Database Management
System.' It is represented as a table that contains rows and column.
 RDBMS is based on the Relational model; it was introduced by E. F.
Codd.
A relational database contains the following components:
• Table
• Record/ Tuple
• Field/Column name /Attribute
• Instance
• Schema
• Keys
 An RDBMS is a tabular DBMS that maintains the security, integrity,
accuracy, and consistency of the data.
DATA PROCESSING
REQUIREMENT
 Data processing requirements refer to the specific needs and criteria that must be met
in order to effectively and efficiently process data within a system or application.
These requirements2 are crucial for designing, implementing, and maintaining
systems that handle data in various industries and domains.
 Here are key considerations for data processing requirements:

• Data Types and Formats: • Performance Requirements:


• Data Input Requirements: • Data Backup and Recovery:
• Data Storage Requirements: • Data Retention and Archiving:
• Data Processing Logic: • Data Governance:
• Data Integration Requirements: • Compliance Requirements:
• Data Quality and Cleansing: • Interoperability:
• Data Security and Privacy: • User Interface and Reporting:
• Scalability:
DATA TYPES AND FORMATS
• Specify the types of data that the system will handle (e.g., text, numbers, images, audio) and the formats in
which data will be stored (e.g., CSV, JSON, database tables).
DATA INPUT REQUIREMENTS:
• Define how data will be collected and entered into the system. This includes specifying input sources, data
entry methods, and validation rules to ensure data accuracy.
DATA STORAGE REQUIREMENTS:
• Outline the storage mechanisms and structures required to store and organize data. Consider factors such as
database systems, file storage, and data partitioning strategies.
DATA PROCESSING LOGIC:
• Define the processing logic that transforms raw data into meaningful information. This includes algorithms,
business rules, and calculations applied to the data.
DATA INTEGRATION REQUIREMENTS:
• Specify how data from different sources or systems will be integrated. This may involve data synchronization,
data warehousing, or the use of APIs for data exchange.
DATA QUALITY AND CLEANSING:
• Establish criteria for data quality, including rules for data validation, cleaning, and error handling. Ensure that
the data is accurate, consistent, and reliable.
DATA SECURITY AND PRIVACY:
• Define security measures to protect data confidentiality, integrity, and availability. Specify access controls,
encryption, and compliance with privacy regulations.
SCALABILITY:
• Determine how the system will handle growing volumes of data. Consider scalability in terms of both storage
capacity and processing power.
PERFORMANCE REQUIREMENTS:
• Define performance metrics and expectations, such as response times for queries and processing throughput.
Ensure that the system meets performance requirements under various loads.
DATA BACKUP AND RECOVERY:
• Specify procedures for regular data backups and define the process for data recovery in the event of system
failures, errors, or disasters.
DATA RETENTION AND ARCHIVING:
• Outline policies for data retention, archiving, and deletion. Consider legal and compliance requirements related
to data storage and retention periods.
DATA GOVERNANCE:
• Define roles and responsibilities for data management, including data ownership, stewardship, and
accountability within the organization.
COMPLIANCE REQUIREMENTS:
• Ensure that the data processing system complies with relevant industry regulations, legal requirements, and data
protection laws.
INTEROPERABILITY:
•Specify requirements for integrating with other systems or platforms, ensuring that data can be exchanged
seamlessly between different applications.
USER INTERFACE AND REPORTING:
•Define user interface requirements for data entry, retrieval, and visualization. Specify reporting and analytics
features required to derive insights from the processed data.

Clear and well-defined data processing requirements are essential for building robust and effective systems that
meet the needs of users and stakeholders while ensuring the integrity and security of the processed data.
DATA BASE SYSTEM APPLICATIONS
 Database systems are a fundamental component of various
applications across different domains. They provide a structured and
organized way to store, manage, and retrieve data.
 Here are some common types of database system applications:
ENTERPRISE RESOURCE PLANNING (ERP) SYSTEMS:
 ERP systems integrate and manage various business processes, including finance, human resources, supply chain, and manufacturing.
Databases in ERP systems store and retrieve data to support the overall functioning of an organization.

CUSTOMER RELATIONSHIP MANAGEMENT (CRM)


SYSTEMS:
 CRM systems help businesses manage interactions with their customers. Databases in CRM systems store customer information, interactions,
and transactions, enabling businesses to improve customer relationships and sales processes.

HUMAN RESOURCE MANAGEMENT SYSTEMS (HRMS):


 HRMS applications use databases to store employee data, manage payroll, track attendance, and support other HR-related functions. These
systems streamline HR processes within an organization.

E-COMMERCE AND ONLINE RETAIL SYSTEMS:


 Online retail platforms use databases to store product information, customer profiles, order history, and transaction details. Databases play a
crucial role in managing inventory, processing orders, and providing a seamless shopping experience.

HEALTHCARE INFORMATION SYSTEMS:


 Healthcare applications, such as Electronic Health Records (EHR) systems, use databases to store patient information, medical records, test
results, and treatment plans. These systems help healthcare professionals manage and access patient data efficiently.

BANKING AND FINANCIAL SYSTEMS:


 Banking applications use databases to manage customer accounts, transactions, and financial data. These systems support online banking,
EDUCATIONAL MANAGEMENT SYSTEMS:
 Educational institutions use databases to store student information, course details, grades, and academic
records. Educational management systems facilitate efficient administration and communication within schools
and universities.
CONTENT MANAGEMENT SYSTEMS (CMS):
 CMS platforms use databases to store and retrieve content, such as articles, images, and multimedia files. These
systems help manage and publish content on websites.
GEOGRAPHIC INFORMATION SYSTEMS (GIS):
 GIS applications use databases to store spatial and geographic data. They enable the analysis, visualization, and
interpretation of geographical information, supporting activities like map creation and urban planning.
SUPPLY CHAIN MANAGEMENT SYSTEMS:
 Supply chain applications use databases to manage inventory, track shipments, and optimize logistics. These
systems support the efficient flow of goods and information across the supply chain.
TELECOMMUNICATIONS SYSTEMS:
 Telecommunications applications use databases to manage subscriber information, call records, billing details,
and network configurations. Databases play a critical role in maintaining the integrity of telecommunications
data.
SOCIAL MEDIA PLATFORMS:

Social media platforms rely on databases to store user profiles, posts, comments, and other social interactions.
Databases enable real-time access to social content and support features like search and recommendations.
DATA BASE SYSTEM VS TRADITIONAL FILE-
File-Based System Database System
BASED
Data Organization SYSTEM
In a traditional file-based system, data is In a database system, data is organized into
organized into files or folders. Each tables with rows and columns. The relational
application program typically has its own model is commonly used, which minimizes
set of files, and data redundancy may redundancy by linking related data through
occur if the same information is stored in keys and relationships.
multiple files

Data Independence Changes in data structures or file formats Database systems provide a level of
often require modifications to multiple abstraction called data independence.
application programs. Programs are Changes in the database structure do not
closely tied to the data format. affect application programs, ensuring a higher
degree of flexibility.
Data Redundancy Redundancy is common, as the same data Redundancy is minimized through
may be stored in multiple files. normalization techniques. Data is stored in a
Maintaining consistency across files can centralized and structured manner, reducing
be challenging. duplication and improving data consistency.
DATA BASE SYSTEM VS TRADITIONAL FILE-
File-Based System Database System
BASED
Data RetrievalSYSTEM
and Retrieving and querying data in a file- Database management systems (DBMS)
Querying based system often involves writing provide a standardized language (SQL) for
custom programs for each query. There is querying data. Users can retrieve information
limited support for complex queries. using powerful and flexible queries without
the need to write custom programs.
Concurrency and Data Ensuring data consistency and integrity Database systems use sophisticated
Integrity in concurrent access situations is concurrency control mechanisms to manage
challenging. File locking mechanisms simultaneous access to data. ACID properties
may be employed. (Atomicity, Consistency, Isolation,
Durability) ensure data integrity in
transactions.

Scalability Scalability can be limited, especially as Database systems are designed to handle large
the volume of data and the number of volumes of data and users. They provide
users increase. mechanisms for optimizing performance and
scalability.
DATA BASE SYSTEM VS TRADITIONAL FILE-
BASED SYSTEM
File-Based System Database System
Data Security Security measures are typically Database systems offer centralized and robust
implemented on individual files, making security features. Access control is managed
it challenging to manage security at the database level, ensuring a unified and
consistently. controlled security environment.
Data Relationships Establishing and managing relationships Relationships between data are explicitly
between data in different files is the defined in the database schema, facilitating
responsibility of individual programs. easier management and navigation of
complex data relationships.
DATA ABSTRACTION
Data abstraction is the procedure of concealing irrelevant or unwanted data from the end user.

• The database system contains intricate(complicated) data structures and relations. The
developers keep away the complex data from the user and remove the complications so that
the user can comfortably access data in the database and can only access the data they want,
which is done with the help of data abstraction.
• The main purpose of data abstraction is to hide irrelevant data and provide an abstract view
of the data. With the help of data abstraction, developers hide irrelevant data from the user
and provide them the relevant data. By doing this, users can access the data without any
hassle, and the system will also work efficiently.

• In DBMS, data abstraction is performed in layers which means there are levels of data
abstraction in DBMS that Based on these levels, the database management system is
designed.
LEVELS OF DATA
ABSTRACTIONS
1. PHYSICAL OR INTERNAL LEVEL:
The physical or internal layer is the lowest level of data abstraction in the database management
system. It is the layer that defines how data is actually stored in the database. It defines methods to
access the data in the database. It defines complex data structures in detail, so it is very complex to
understand, which is why it is kept hidden from the end user.

Data Administrators (DBA) decide how to arrange data and where to store data. The Data
Administrator (DBA) is the person whose role is to manage the data in the database at the physical or
internal level. There is a data center that securely stores the raw data in detail on hard drives at this
level.
2. LOGICAL OR CONCEPTUAL LEVEL:
The logical or conceptual level is the intermediate or next level of data abstraction. It explains what
data is going to be stored in the database and what the relationship is between them.
It describes the structure of the entire data in the form of tables. The logical level or conceptual level is
less complex than the physical level. With the help of the logical level, Data Administrators (DBA)
abstract data from raw data present at the physical level.
3. VIEW OR EXTERNAL LEVEL:
View or External Level is the highest level of data abstraction. There are different views at this level
that define the parts of the overall data of the database. This level is for the end-user interaction; at this
level, end users can access the data based on their queries.
ADVANTAGES OF DATA
ABSTRACTION INqueries.
•Users can easily access the data based on their DBMS
•It provides security to the data stored in the database.
•Database systems work efficiently because of data abstraction.
DBMS SCHEMA
DBMS schema means designing the database.

For example, if we take the example of the employee table. The employee table contains the following attributes.
These attributes are EMP_ID, EMP_ADDRESS, EMP_NAME, EMP_CONTACT. These are the schema of the
employee table.

Schema is further divided into three types. These three are as follows.
1.Logical schema.
2.View schema.
3.Physical schema.
The schema defines the logical view of the database. It provides some knowledge about the database and what data
needs to go where.
We can understand the relationship between the data present in the database. With the help of this schema, we can
implement the DBMS function such as delete, insert, search, update, etc.
Let us understand this by the below diagram. There are three diagrams, i.e., section, course, and student. This diagram
shows the relationship between the section and the course diagram. Schema is the only type of structural view of the
database that is shown below.
1. PHYSICAL SCHEMA:
In the physical schema, the database is designed at the physical level. At this level, the schema describes how the
data block is stored and how the storage is managed.
2. LOGICAL SCHEMA:
In the logical schema, the database is designed at a logical level. At this level, the programmer and data
administrator perform their work. Also, at this level, a certain amount of data is stored in a structured way. But the
internal implementation data are hidden in the physical layer for the security proposed.
3. VIEW SCHEMA:
In view schema, the database is designed at the view level. This schema describes the user interaction with the
database system.

Data Definition Language (DDL) statements help to denote the schema of a database. The schema represents the
name of the table, the name of attributes, and their types; constraints of the tables are related to the schema.
Therefore, if users want to modify the schema, they can write DDL statements.
DBMS INSTANCE
In DBMS, the data is stored for a particular amount of time and is called an instance of the database.

The database schema defines the attributes of the database in the particular DBMS. The value of the particular
attribute at a particular moment in time is known as an instance of the DBMS.

For example, in the above example, we have taken the example of the attribute of the schema. In this example,
each table contains two rows or two records. In the above schema of the table, the employee table has some
instances because all the data stored by the table have some instances.

Let's take another example: Let's say we have a single table student in the database; today, the table has 100
records, so today, the instance of the database has 100 records. We are going to add another 100 records to this
table by tomorrow, so the instance of the database tomorrow will have 200 records in the table. In short, at a
particular moment, the data stored in the database is called the instance; this change over time as and when we
add, delete or update data in the database.
DIFFERENCES BETWEEN DATABASE
SCHEMA
Database Schema
AND INSTANCE
Database Instance
It is the definition of the database, or it is defined as the It is a snapshot of a database at a specific moment.
description of the database.

It rarely changes. It changes frequently.


This corresponds to the variable declaration of a The value of the variable in a program at a point in time
programming language. corresponds to an instance of the database schema.

Defines the basic structure of the database, i.e., how the It is the set of Information stored at a particular time.
data will be stored in the database.

Schema is same for whole database. Data in instances can be changed using addition,
deletion, updation.

It does not change very frequently. It changes very frequently


DATA MODELS
Data Model is the modeling of the data description, data semantics, and consistency constraints of the data. It
provides the conceptual tools for describing the design of a database at each level of data abstraction.

There are following four data models used for understanding the structure of the database
RELATIONAL DATA MODEL
 This type of model designs the data in the form of rows and columns within a table. Thus, a
relational model uses tables for representing data and in-between relationships. Tables are also
called relations.
 This model was initially described by Edgar F. Codd, in 1969.
 The relational data model is the widely used model which is primarily used by commercial
data processing applications.

ENTITY-RELATIONSHIP DATA MODEL


 An ER model is the logical representation of data as objects and relationships among them. These objects are known as
entities, and relationship is an association among these entities.
 This model was designed by Peter Chen and published in 1976 papers.
 It was widely used in database designing.
 A set of attributes describe the entities.
 For example, student_name, student_id describes the 'student' entity. A set of the same type of entities is known as an
'Entity set', and the set of the same type of relationships is known as 'relationship set'.
OBJECT-BASED DATA MODEL
 An extension of the ER model with notions of functions, encapsulation, and object identity, as
well. This model supports a rich type system that includes structured and collection types.
 in 1980s, various database systems following the object-oriented approach were developed.
 Here, the objects are nothing but the data carrying its properties.

SEMISTRUCTURED DATA MODEL


 This type of data model is different from the other three data models
(explained above).
 The semistructured data model allows the data specifications at places where
the individual data items of the same type may have different attributes sets.
 The Extensible Markup Language, also known as XML, is widely used for
representing the semistructured data. Although XML was initially designed
for including the markup information to the text document,
 it gains importance because of its application in the exchange of data.
DATA MODEL SCHEMA AND
 The data which is stored in the database at a particular moment of time is called an instance of the database.

INSTANCE
 The overall design of a database is called schema.
 A database schema is the skeleton structure of the database. It represents the logical view of the entire database.
 A schema contains schema objects like table, foreign key, primary key, views, columns, data types, stored
procedure, etc.
 A database schema can be represented by using the visual diagram. That diagram shows the database objects
and relationship with each other.
 A database schema is designed by the database designers to help programmers whose software will interact with
the database. The process of database creation is called data modeling.

A schema diagram can display only some aspects of a schema like the name of record type, data type, and
constraints. Other aspects can't be specified through the schema diagram.

For example, the given figure neither show the data type of each data item nor the relationship among
various files.
In the database, actual data changes quite frequently.

For example, in the given figure, the database changes whenever we add a new grade or add a student.
The data at a particular moment of time is called the instance of the database.
DATA INDEPENDENCE
• Data independence can be explained using the three-schema architecture.
• Data independence refers characteristic of being able to modify the schema at one
level of the database system without altering the schema at the next higher level.

 There are two types of data independence:


1. Logical Data Independence
2. Physical Data Independence
LOGICAL DATA INDEPENDENCE
 Logical data independence refers characteristic of being able to change the conceptual schema
without having to change the external schema.
 Logical data independence is used to separate the external level from the conceptual view.
 If we do any changes in the conceptual view of the data, then the user view of the data would
not be affected.
 Logical data independence occurs at the user interface level.

PHYSICAL DATA INDEPENDENCE


 Physical data independence can be defined as the capacity to change the internal schema
without having to change the conceptual schema.
 If we do any changes in the storage size of the database system server, then the Conceptual
structure of the database will not be affected.
 Physical data independence is used to separate conceptual levels from the internal levels.
 Physical data independence occurs at the logical interface level.
DATABASE LANGUAGES
 A DBMS has appropriate languages and interfaces to express database queries and updates.
 Database languages can be used to read, store and update the data in the database.

Types of data Languages


DATA DEFINITION LANGUAGE


(DDL)
DDL stands for Data Definition Language. It is used to define database structure or pattern.
It is used to create schema, tables, indexes, constraints, etc. in the database.
 Using the DDL statements, you can create the skeleton of the database.
 Data definition language is used to store the information of metadata like the number of tables and schemas, their
names, indexes, columns in each table, constraints, etc.

Here are some tasks that come under DDL:

 Create: It is used to create objects in the database.


 Alter: It is used to alter the structure of the database.
 Drop: It is used to delete objects from the database.
 Truncate: It is used to remove all records from a table.
 Rename: It is used to rename an object.
 Comment: It is used to comment on the data dictionary.
DATA MANIPULATION LANGUAGE

(DML)
DML stands for Data Manipulation Language. It is used for accessing and manipulating data in a
database. It handles user requests.

Here are some tasks that come under DML:

 Select: It is used to retrieve data from a database.


 Insert: It is used to insert data into a table.
 Update: It is used to update existing data within a table.
 Delete: It is used to delete all records from a table.
 Merge: It performs UPSERT operation, i.e., insert or update operations.
 Call: It is used to call a structured query language or a Java subprogram.
 Explain Plan: It has the parameter of explaining data.
 Lock Table: It controls concurrency.
DATA CONTROL LANGUAGE (DCL)
 DCL stands for Data Control Language. It is used to retrieve the stored or saved data.
 The DCL execution is transactional. It also has rollback parameters.
 (But in Oracle database, the execution of data control language does not have the feature of rolling back.)
 Here are some tasks that come under DCL:
 Grant: It is used to give user access privileges to a database.
 Revoke: It is used to take back permissions from the user.
 There are the following operations which have the authorization of Revoke:
 CONNECT, INSERT, USAGE, EXECUTE, DELETE, UPDATE and SELECT.

TRANSACTION CONTROL LANGUAGE (TCL)


 TCL is used to run the changes made by the DML statement. TCL can be grouped into a logical transaction.
 Here are some tasks that come under TCL:
 Commit: It is used to save the transaction on the database.
 Rollback: It is used to restore the database to original since the last Commit.
DATA BASE USER
Database users play a crucial role in interacting with and utilizing the information stored in a database.
They can be broadly categorized into different roles based on their responsibilities and interactions with
the database system.
Some common types of database users:
 End Users:
 Application Programmers:
 Data Analysts:
 Database Administrators (DBAs):
 System Administrators:
 Security Administrators:
 Database Developers:
 Data Stewards:
 Executive Users:
 Database Designers:
1. End Users:
 Casual End Users: These users interact with the database occasionally. They may use pre-defined queries or reports
to retrieve specific information.
 Naive Users: Have little or no knowledge of the database structure. They use forms and canned transactions to
interact with the database.
2. Application Programmers:
 Develop software applications that interact with the database.
 Write code to handle database operations such as insert, update, delete, and retrieve data.
 Use APIs (Application Programming Interfaces) or database connectors to integrate database functionality into
applications.
3. Data Analysts:
 Analyze and interpret data stored in the database to provide insights.
 Run complex queries and generate reports to support decision-making processes.
 May use business intelligence tools for data visualization and analysis.

4. Database Administrators (DBAs):


 Manage and maintain the overall health and performance of the database system.
 Ensure data security, integrity, and availability.
 Perform tasks such as database design, security management, backup and recovery, and optimization.

5. System Administrators:
 Manage the server infrastructure on which the database system operates.
6. Security Administrators:
• Specialize in enforcing security measures within the database system.
• Manage user access, define roles and permissions, and monitor for security threats.
7. Database Developers:
• Design and implement the database schema and structures.
• Write SQL queries, stored procedures, triggers, and other database objects.
• Collaborate with application developers to ensure effective integration with databases.
8. Data Stewards:
• Ensure the quality, accuracy, and consistency of data within the database.
• Define and enforce data quality standards.
• Monitor and resolve data quality issues.
9. Executive Users:
• Executives and top-level management who use summary-level information for decision-making.
• May access dashboards or reports providing key performance indicators (KPIs).
10. Database Designers:
• Responsible for creating the initial database design, including tables, relationships, and constraints.
• Work on translating business requirements into an effective database structure.
DATA BASE ADMINISTRATOR
 A Database Administrator (DBA) is a professional responsible for the overall management, maintenance, and performance of
a database system.
 DBAs play a crucial role in ensuring the integrity, security, and availability of data, as well as optimizing the performance of
the database. Their responsibilities can vary depending on the size of the organization and the complexity of the database
system.
 Some key aspects of the role of a Database Administrator:
 Database Design:
 Security Management:
 Backup and Recovery:
 Performance Tuning:
 Database Maintenance:
 User Management:
 Data Migration:
 Disaster Recovery Planning:
 Database Upgrades and Patching:
 Capacity Planning:
 Documentation:
1. Database Design:
 Collaborate with database designers and developers to design the logical and physical structure of the database.
 Define tables, relationships, constraints, and indexes based on business requirements.

2. Security Management:
 Control access to the database by managing user accounts, roles, and permissions.
 Implement security measures to protect sensitive data.
 Enforce authentication mechanisms to ensure authorized access.

3. Backup and Recovery:


 Develop and implement backup and recovery strategies to safeguard data against loss or corruption.
 Regularly schedule and perform backups to ensure data can be restored in case of failures.

4. Performance Tuning:
 Optimize the database for efficient and fast query performance.
 Monitor and analyze system performance to identify and address bottlenecks.
 Tune SQL queries and database configurations for optimal efficiency.
5. Database Maintenance:
• Perform routine maintenance tasks, such as updating statistics, rebuilding indexes, and cleaning up unnecessary
data.
• Monitor system logs for errors and address issues promptly.
6. User Management:
• Create, modify, and delete user accounts.
• Assign roles and permissions based on job responsibilities.
• Ensure compliance with security policies.
7. Data Migration:
• Plan and execute data migration and transformation processes.
• Ensure data integrity and consistency during migration.
8. Disaster Recovery Planning:
• Develop and document disaster recovery plans to minimize downtime in the event of a system failure or disaster.
• Test and validate the effectiveness of recovery procedures.
9. Database Upgrades and Patching:
• Plan and execute database upgrades to newer versions.
• Apply patches and updates to address security vulnerabilities and improve system stability.
10. Capacity Planning:
Monitor and analyze database growth trends.
Plan for future capacity requirements and scaling.
11. Documentation:
Maintain comprehensive documentation of the database schema, configurations, and procedures.
Provide documentation for troubleshooting and knowledge sharing.
12. Collaboration:
Collaborate with developers, system administrators, and other stakeholders to ensure the smooth operation of the
database system.
Participate in cross-functional teams for project planning and implementation.

Database Administrators may specialize in different database management systems (e.g., Oracle, MySQL, Microsoft
SQL Server) and may work in various industries, including finance, healthcare, e-commerce, and more.

Their expertise is essential for maintaining a secure, efficient, and reliable database environment.
DATABASE ARCHITECTURE
 A Database Architecture is a representation of DBMS design.
 It helps to design, develop, implement, and maintain the database management system.
 A DBMS architecture allows dividing the database system into individual components that can be independently
modified, changed, replaced, and altered.
 It also helps to understand the components of a database.
TYPES OF DBMS
ARCHITECTURE
There are mainly three types of DBMS architecture:
• One Tier Architecture (Single Tier Architecture)
• Two Tier Architecture
• Three Tier Architecture
1-TIER ARCHITECTURE
• 1 Tier Architecture in DBMS is the simplest architecture of Database in which the client, server, and
Database all reside on the same machine.
• A simple one tier architecture example would be anytime you install a Database in your system and
access it to practice SQL queries. But such architecture is rarely used in production.

1 Tier Architecture Diagram


2-TIER ARCHITECTURE
• A 2 Tier Architecture in DBMS is a Database architecture where the presentation layer runs on a client
(PC, Mobile, Tablet, etc.), and data is stored on a server called the second tier.
• Two tier architecture provides added security to the DBMS as it is not exposed to the end-user directly.
It also provides direct and faster communication.

2 Tier Architecture Diagram


3-TIER ARCHITECTURE
• A 3 Tier Architecture in DBMS is the most popular client server architecture in DBMS in which the development
and maintenance of functional processes, logic, data access, data storage, and user interface is done independently
as separate modules.
• Three Tier architecture contains a presentation layer, an application layer, and a database server.

• 3-Tier database Architecture design is an extension of the 2-tier client-server architecture. A 3-tier architecture has
the following layers:
• Presentation layer (your PC, Tablet, Mobile, etc.)

• Application layer (server)

• Database Server

The Application layer resides between the user and the DBMS, which is responsible for communicating the user’s
request to the DBMS system and send the response from the DBMS to the user. The application layer(business
logic layer) also processes functional logic, constraint, and rules before passing data to the user or down to the
DBMS.
STRUCTURE OF DATABASE
MANAGEMENT
but it is different from the tier architecture of SYSTEM
Structure of Database Management System is also referred to as Overall System Structure or Database Architecture
Database.

Database Management System (DBMS) is software that allows access to data stored in a database and provides an
easy and effective method of –
• Defining the information.

• Storing the information.

• Manipulating the information.

• Protecting the information from system crashes or data theft.

• Differentiating access permissions for different users.

• Data Theft: When somebody steals the information stored on databases, and servers, this process is
known as Data Theft.
The database system is divided into three components: Query Processor, Storage Manager, and Disk Storage.

1. Query Processor: It interprets the requests (queries) received from end user via an application program into
instructions. It also executes the user request which is received from the DML compiler.
Query Processor contains the following components –
•DML Compiler: It processes the DML statements into low level instruction (machine language), so that they can be
executed.
•DDL Interpreter: It processes the DDL statements into a set of table containing meta data (data about data).
•Embedded DML Pre-compiler: It processes DML statements embedded in an application program into procedural
calls.
•Query Optimizer: It executes the instruction generated by DML Compiler.
The database system is divided into three components: Query Processor, Storage Manager, and Disk Storage.
2. Storage Manager: Storage Manager is a program that provides an interface between the data stored in the database
and the queries received. It is also known as Database Control System. It maintains the consistency and integrity of the
database by applying the constraints and executing the DCL statements. It is responsible for updating, storing, deleting,
and retrieving data in the database.
It contains the following components –
•Authorization Manager: It ensures role-based access control, i.e,. checks whether the particular person is privileged
to perform the requested operation or not.

•Integrity Manager: It checks the integrity constraints when the database is modified.

•Transaction Manager: It controls concurrent access by performing the operations in a scheduled way that it receives
the transaction. Thus, it ensures that the database remains in the consistent state before and after the execution of a
transaction.

•File Manager: It manages the file space and the data structure used to represent information in the database.

•Buffer Manager: It is responsible for cache memory and the transfer of data between the secondary storage and main
memory.
3. Disk Storage: It contains the following components –
•Data Files: It stores the data.

•Data Dictionary: It contains the information about the structure of any database object. It is the repository of
information that governs the metadata.
•Indices: It provides faster retrieval of data item.
The structure of a Database Management System (DBMS) can be divided into three main components: the Internal Level,
the Conceptual Level, and the External Level.

1.Internal Level: This level represents the physical storage of data in the database. It is responsible for storing and
retrieving data from the storage devices, such as hard drives or solid-state drives. It deals with low-level implementation
details such as data compression, indexing, and storage allocation.
2.Conceptual Level: This level represents the logical view of the database. It deals with the overall organization of data in
the database and the relationships between them. It defines the data schema, which includes tables, attributes, and their
relationships. The conceptual level is independent of any specific DBMS and can be implemented using different DBMSs.
3.External Level: This level represents the user’s view of the database. It deals with how users access the data in the
database. It allows users to view data in a way that makes sense to them, without worrying about the underlying
implementation details. The external level provides a set of views or interfaces to the database, which are tailored to meet
the needs of specific user groups.
The three levels are connected through a schema mapping process that translates data from one level to another. The
schema mapping process ensures that changes made at one level are reflected in the other levels.
In addition to these three levels, a DBMS also includes a Database Administrator (DBA) component, which is
responsible for managing the database system. The DBA is responsible for tasks such as database design, security
management, backup and recovery, and performance tuning.
Overall, the structure of a DBMS is designed to provide a high level of abstraction to users, while still allowing low-
level implementation details to be managed effectively. This allows users to focus on the logical organization of data
in the database, without worrying about the physical storage or implementation details.
QUESTION
ANSWER
1. Define the terms data and information?
2. Define (i) Database (ii)DBMS
3. What are the disadvantages of file processing system?
4. Define instances and schemas of database?
5. What is data model? List the types of data models?
6. What is data Abstraction?
7. Who is DBA? What are the responsibilities of DBA?
8. Discuss Data Independence?
9. Explain Application of DBMS
10. What are the advantages of DBMS?
11. Define the terms: 1. Physical schema 2. logical schema
12. Give the levels of data abstraction?
13. What is the purpose of storage manager?
14. Differentiate between database system and file system?
15. Define Database Recovery.
16. Define Two Tier and Three Tier Architecture?
17. Discuss Transaction management?
18. Define Relationship and Relationship set?
19. Explain the architecture of DBMS?
1. Define Data Abstraction and discuss levels of Abstraction?
2. Discuss about different types of Data models?
3. Describe the architecture of DBMS?
4. Compare and Contrast file Systems with database system?
5. Discuss additional features of the ER-Models?
6. Discuss about the logical database Design?
7. What is physical, logical and view level data abstraction.
8. What is constraint in database? Explain types of constraints with suitable example?
9. Describe Relational model.
10. Difference between 2-Tier and 3-Tier architecture?

11. Explain the purpose of the database system. Explain different database users. What are the responsibilities of a
DBA?
12. Define Database Management System. What is the role of Database administrator ?
13. Draw and explain System structure of Database management system.
14. What are the disadvantages of file-processing system?
15. Define and explain following terms. Levels of data abstraction, Instances, Schema, Physical data independence,
Logical data independence.
16. What is dbms? List and explain various database user.
1.DEFINE THE TERMS DATA AND INFORMATION?
2 DEFINE (I) DATABASE (II)DBMS

You might also like