Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
10 views34 pages

CH.1 Introduction To DBMS

The document provides an introduction to Database Management Systems (DBMS), covering basic concepts, advantages over traditional file processing systems, and data abstraction. It discusses the limitations of manual and traditional file-based systems, the characteristics and applications of DBMS, and the various types of database languages. Additionally, it highlights the advantages and disadvantages of using DBMS, as well as the levels of data abstraction.

Uploaded by

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

CH.1 Introduction To DBMS

The document provides an introduction to Database Management Systems (DBMS), covering basic concepts, advantages over traditional file processing systems, and data abstraction. It discusses the limitations of manual and traditional file-based systems, the characteristics and applications of DBMS, and the various types of database languages. Additionally, it highlights the advantages and disadvantages of using DBMS, as well as the levels of data abstraction.

Uploaded by

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

Database Management System

Unit I
Introduction to DBMS

Introduction : Basic concepts, Advantages of DBMS over file processing


systems, Data abstraction, Database languages, Data models, Data
independence, Components of a DBMS, Overall structure of DBMS, Multi-user
DBMS architecture, System catalogs, Data Modeling: Basic concepts, Entity,
attributes, relationships, constraints, keys.

❖​ Basics :
Data,Database and its management systems are an essential part of our daily life
through various activities.
For example: bank : deposit or withdraw money, book tickets,buy something from
shops.
In a traditional database system , data is stored in only numeric and textual forms.
But nowadays with advancement in technology, this data can be organised using
audio,images,videos,graphics etc.

❖​ Introduction :
Data: Raw facts and figures which give information.Example student name Ram
which represents Ram.
Base : the one who represents data .Example : Ram which is nothing but a
name.Another example 2,3,4….. Numbers
Management: how to organise this data in the form of table,tree, schema, how to
view it and report it etc.
System: Techniques,application,platform used to manage this data.
The primary goal of DBMS is to provide a way to store and retrieve database
information that is both convenient and efficient.
Basic Concept:
Traditional database Systems: 1.Manual 2.File Processing System

1.Manual Database System:


●​ A manual database is a non-computerized database that uses paper to store data.
●​ In the manual approach, data storage and retrieval follows the traditional way of
information handling where cards and paper are used for the purpose.
●​ The data storage and retrieval will be performed using human labour.
●​ Files, for as many events and objects as the organization has, are used to store
information.
●​ Each of the files containing various kinds of information is labelled and stored
in one or more cabinets.
●​ The cabinets could be kept in safe places for security purposes based on the
sensitivity of the information contained in it.
●​ Insertion and retrieval is done by searching first for the right cabinet then for the
right the file then the information.
●​ One could have an indexing system to facilitate access to the data.

Limitations of the Manual approach


●​ Prone to error
●​ Difficult to update, retrieve, integrate
●​ You have the data but it is difficult to compile the information
●​ Limited to small size information
●​ Cross referencing is difficult

An alternative approach of data handling is a computerized way of dealing with


the information. The computerized approach could also be either decentralized
or centralized base on where the data resides in the system.

2. Traditional File Based Approach


What is Traditional File Processing System And Its Characteristics:
●​ Before the use of computers, a manual file system was used to maintain the
records and files. All the data was stored in files and it makes it easy to find any
information. But this system was good only for small organizations having a
small number of items.

Manual FIle processing system has many disadvantages :

●​ It was time consuming.


●​ Inefficient to maintain the record of big firms having large numbers of items.
●​ It requires a lot of labor work to do.
●​ It becomes more complex when anyone requires changing the information.

❖​ To overcome these disadvantages and to make the processing fast, File


Processing System was introduced. This system was able to solve all the above
problems.
Let us find what a Traditional File Processing System was.
●​ It was a totally computer based system where all the information is stored in
different computer files.
●​ Also traditional files systems store data in a manner that all the departments of
an organization have their own set of files that creates data redundancy.

To illustrate Traditional File Processing Systems definition, let us take an example of


a college where a student record for examination is stored in another file and his
library record is stored in a different file that creates many duplicate values like roll
Number, Name and Father Name.
A typical Traditional File Processing Systems is shown in the diagram that shows
program and data independency.

●​ The main highlight in this figure is data and program independence.


●​ It means that data and programs depend upon each other.
●​ And due to this, any change in one file will affect all the others files too.

❖​ Characteristics of Traditional File Processing Systems that are given below.


●​ It stores data of an organization in a group of files.
●​ Files carrying data are independent of each other.
●​ COBOL, C, C++ programming languages were used to design the files.
●​ Each file contains data for some specific area or department like library, student
fees, and student examinations.

limitations:

●​ It is less flexible.
●​ It is very difficult to maintain a file processing system.
●​ Any change in one file affects all the files that creates a burden on the
programmer.
●​ Files in Traditional File Processing Systems are called flat files.

Overall, Traditional File Processing Systems was good in many cases in


comparison to manual non computer based systems but still it had many disadvantages
that were overcome by Database Management System.

Introduction to DBMS

DBMS is a collection of interrelated data and a set of programs that access those data.

Database + Management System= DBMS

According to Prakash Naveen, “Database is a mechanized, shared, formally defined


and central collection of data used in an organization.”

M. Martin Described, “Database is a collection of interrelated data stored together


without harmful or unnecessary redundancy to serve multiple applications.”
Mac-Millan dictionary of Information Technology explained database as, “a
collection of interrelated data stored so that it may be accessed by authorized users
with simple users-friendly dialogues.”

A database is a collection of related data stored , so that different users can use this
data for different purposes.
The database is a collection of organized sets of data that make it straightforward to
access, manage, manipulate and update as well.

In short, it makes the management of data easy.

Moreover, the data can be in any form related to facts such as pictures, file, images,
pdf and so on.

Here are a few examples of our daily life. To exemplify, the online telephone
directory uses the database for the entire data related to the clients including their
name, contact number, address and so on. At the same token, the database is also used
in electricity services for handling bills, issues related to clients and managing fault
data and many more.

Moreover, you can also take an example of Facebook that needs to store the whole
data related to their members, friends, activities, messages and advertisements.

The origin of the database exists before the invention of the computer as it is needed
in libraries, governmental, business and medical records. Moreover, it was observed
that they required maintaining and storing the data for retrieval and they found some
ways at that time. With the introduction of the computer, it becomes quite easy, time
effective and consumes less space to collect as well as maintain the database.
Database Management system i.e. DBMS is a collection of programs for
managing data and simultaneously it supports different types of users to create,
manage, retrieve, update and store information.

For example, from a small startup firm to the multinational companies and industries
managing a huge amount of data becomes a mess. So, software like the DBMS
brought a revolution in many fields regarding efficient information management.
Database System Application:

There are a wide range of applications that make use of database systems.
Some of the applications are -
1) Accounting: Database systems are used in maintaining information about
employees, salaries, and payroll taxes.

2) Manufacturing: For management of supply chain and tracking production of


items in factories database systems are maintained.

3) For maintaining customer, product and purchase information the databases are
used.

4) Banking: In the banking sector, for customer information, accounts and loan and
for performing banking applications the DBMS is used.
5) For purchase on credit cards and generation of monthly statements database
systems are useful.

6) Universities: The database systems are used in universities for maintaining student
information, course registration, and accounting.

7) Reservation systems: In airline/railway reservation systems, the database is used


to maintain the reservation and schedule information.

8) Telecommunication: In telecommunications for keeping records of the calls


made, generating monthly bills, maintaining balances on prepaid calling cards, and
storing information about communication networks the database systems are used.

❖​Characteristics of Database Approach

Following are the characteristics of database system:


1) Representation of some aspects of real world applications.
2) Systematic management of information.
3) Representing the data by multiple views.
4) Efficient and easy implementation of various operations such as insertion, deletion
and updation.
5) It maintains data for some specific purpose.
6) It represents the logical relationship between records and data.
Advantages of DBMS

1) DBMS removes the data redundancy that means there is no duplication of data in
the database.

2) DBMS allows us to retrieve the desired data in the required format.

3) Data can be isolated in separate tables for convenient and efficient use.

4) Data can be accessed efficiently using a simple query language.

5) The data integrity can be maintained. That means the constraints can be applied
on data and it should be in some specific range.

6) The atomicity of data can be maintained. That means, if some operation is


performed on one particular table of the database, then the change must be reflected
for the entire database.

7) The DBMS allows concurrent access to multiple users by using the


synchronization technique.

8) The security policies can be applied to DBMS to allow the user to access only the
desired part of the database system.

Disadvantages of DBMS

1) Complex design: Database design is complex, difficult and time consuming.

2) Hardware and software cost: Large amount of investment is needed to set up the
required hardware or to repair software failure.

3) Damaged part: If one part of the database is corrupted or damaged, then the entire
database may get affected.
4) Conversion cost: If the current system is in a conventional file system and if we
need to convert it to database systems then a large amount of cost is incurred in
purchasing different tools, and adopting different techniques as per the requirement.

5) Training: For designing and maintaining the database systems, the people need to
be trained.

Data Abstraction
Definition of data abstraction: Data abstraction means retrieving only the required
amount of information about the system and hiding background details.
There are several levels of abstraction that simplify user interactions with the system.

These are:
1) Physical level:
o This is the lowest level.
o This level describes how the data are stored.
o The database administrators decide how to store data at the physical level.
• This level describes complex low-level data structures.
2) Logical level:
• This is the next higher level, which describes what data are stored in the database?.
• This level also describes the relationship between the data.
• The logical level thus describes the entire database in terms of a small number of
relatively simple structures.
• The database administrators use a logical level of abstraction for deciding what
information to keep in the database.

3) View level:
• This is the highest level of abstraction that describes only part of the entire
database.
• The view level can provide access to only part of the database.
• This level helps in simplifying the interaction with the system.
o It can provide multiple views of the same system.
• For example A Clerk at the reservation system can see only part of the database and
access the passenger's required information.

Examples Of Data Abstraction


Here are some examples of data abstraction in the field of technology and
security:
1.​ Listening to music via headphones
When users listen to music on their smartphone using a pair of wireless headphones,
then they know that they are required to enable the Bluetooth feature on the phone to
establish a connection between the two devices. Headphones also usually have some
buttons or touch gestures on the headphones with which users can control the
headphones.
—->To charge the battery, the headphones may have a charging port for this audio
accessory.Users can listen to the music without a wired connection, but data
abstraction does not allow them to see how the connectivity or signals are working.
For charging the battery as well, they do not know how the socket is transferring
power through the charging cable. Programmers use data abstraction to give users the
functions that matter to them, helping users to enjoy the product or operate it easily.
2.​ Capturing a photograph on a smartphone
3.​ Playing video games on a handheld device
4.​ Withdrawing money from an ATM
5.​ Scanning identity cards before entering a facility

# For example: Consider following record


type employee = record
empID: numeric(10)
empname: char(20)
dept_no: numeric(10)
salary: numeric(8,2)
End
This code defines a new record employee with four fields. Each field is associated
with the field name and its type. There are several other records such as department
with fields dept_no, dept_name, building customer with fields cust_id,cust_name

• At the physical level, the record customer, employee, department can be described
as a block of consecutive storage locations. Many database systems hide lowest level
storage details from database programmers.

• The type definition of the records is decided at the logical level. The programmer
works on the record at this level, similarly database administrators also work at this
level of abstraction.

• There is a specific view of the record that is allowed at the view level. For instance
a customer can view the name of the employee, or id of the employee but cannot
access the employee's salary.

Database Languages
(1) DDL
​ Data Definition Language (DDL) is a specialized language used to specify a
database schema by a set of definitions.
​ It is a language used for creating and modifying the structures of tables,
views, indexes, etc.
​ DDL is also used to specify additional properties of data.
​ Some of the common commands used in DDL are -CREATE, ALTER, DROP.
​ The primary use of the CREATE command is to build a new table. Using the
ALTER command, the users can add up some additional columns and drop existing
columns. Using the DROP command, the user can delete table or view.

​ List of DDL Tasks:


●​ CREATE: Used to create objects in the database (e.g., tables, indexes).
●​ ALTER: Used to modify the structure of existing database objects.
●​ DROP: Used to delete objects from the database.
●​ TRUNCATE: Used to remove all records from a table, including all allocated
space for the records.
●​ COMMENT: Used to add comments to the data dictionary or metadata about
objects.
●​ RENAME: Used to rename an object in the database.

(2) DML:Data Manipulation Language.


​ This language enables users to access or manipulate data as organized by
appropriate data models.
​ The types of access are -
●​ Retrieval of information stored in the database
●​ Insertion of new information into the database.
●​ Deletion of information from the database.
●​ Modification of information stored in the database.

​ There are two types of DML -


• Procedural DML - Require a user to specify what data are needed and how to
get that data.
• Declarative DML - Require a user to specify what data is needed without
specifying how to get that data.
​ Query is a statement used for requesting the retrieval of information. This
retrieval of information using some specific language is called query language.

​ List of DML Tasks:


●​ SELECT: Retrieves data from a database, allowing users to query and retrieve
specific information.
●​ INSERT: Adds new data into a table, creating new records within the database.
●​ UPDATE: Modifies existing data within a table, allowing users to change the
values of specific records.
●​ DELETE: Removes records from a table, effectively deleting data from the
database.
●​ MERGE: Performs an "UPSERT" operation, which means it either inserts new
data or updates existing data, based on specified conditions.
●​ CALL: Used to invoke a structured query language (SQL) or a Java
subprogram, enabling the execution of predefined procedures or functions.
●​ LOCK TABLE: Manages data concurrency by controlling access to specific
database tables, helping prevent conflicts during simultaneous data access.

(3) DCL
●​ The Data Control Language (DCL) is used to control access to data stored in
the database. This is also called authorization.
●​ The typical commands used in DCL are GRANT and REVOKE.
• GRANT: This command is used to give access rights or privileges to the
database.
• REVOKE: The revoke command removes user access rights or privileges to the
database objects.

Data Models
●​ Definition: It is a collection of conceptual tools for describing data,
relationships among data, semantics (meaning) of data and constraints.
●​ Data model is a structure below the database.
●​ Data model provides a way to describe the design of a database at physical,
logical and view level.

There are various data models used in database systems and these are as follows -

(1) Relational
model:
●​ The relation model consists of a collection of tables which stores data and
also represents the relationship among the data.
●​ The table is also known as relation.
●​ The table contains one or more columns and each column has a unique
name.
●​ Each table contains records of a particular type, and each record type defines
a fixed number of fields or attributes.
●​ For example - The following figure shows the relational model by showing the
relationship between Student and Result database. For example - Student
Ram lives in the city Chennai and his marks are 78. Thus the relationship
between these two databases are maintained by SeatNo. Column.

Seat No Name City


Seat Marks
No.
101 Ram Chennai
101 78

102 Shyam Pune 102 95

Advantages:
(i) Structural independence: Structural independence is an ability that allows us to
make changes in one database structure without affecting others. The relational model
has structural independence. Hence making required changes in the database is
convenient in relational database models.

(ii) Conceptual simplicity: The relational model allows the designer to simply focus
on logical design and not on physical design. Hence relational models are
conceptually simple to understand.

(iii) Query capability: Using simple query language (such as SQL) users can get
information from the database or designer can manipulate the database structure.
(iv) Easy design, maintenance and usage: The relational models can be designed
logically hence they are easy to maintain and use.

Disadvantages:
i) Relational models require powerful hardware and large data storage devices.
ii) May lead to slower processing time.
iii) Poorly designed systems lead to poor implementation of database systems.

(2) Entity relationship model:


●​ As the name suggests the entity relationship model uses a collection of basic
objects called entities and relationships.
●​ The entity is a thing or object in the real world.
●​ The entity relationship model is widely used in database design.
●​ For example - Following is a representation of Entity Relationship model in
which the relationship works_for is between entities Employee and Department.

Fig. Entity relationship model

Advantages:

i) Simple: It is simple to draw an ER diagram when we know entities and


relationships.

ii) Easy to understand: The design of ER diagrams is very logical and hence they
are easy to design and understand.
iii) Effective: It is an effective communication tool.

iv) Integrated: The ER model can be easily integrated with the Relational model.

v) Easy conversion: ER models can be converted easily into other types of models.

Disadvantages:

i) Loss of information: While drawing ER models some information can be hidden


or lost.

ii) Limited relationships: The ER model can represent limited relationships as


compared to other models.

iii) No representation for data manipulation: It is not possible to represent data


manipulation in the ER model.

iv) No industry standard: There is no industry standard for notations of ER


diagrams.

(3) Object Based Data Model:

●​ The object oriented languages like C++, Java, C# are becoming the dominant in
software development.
●​ This led to object based data models.
●​ The object based data model combines object oriented features with relational
data models.

Advantages:

i) Enriched modelling: The object based data model has capability of modelling the
real world objects.
ii) Reusability: There are certain features of object oriented design such as
inheritance, polymorphism which help in reusability..

iii) Support for schema evolution: There is a tight coupling between data and
applications, hence there is strong support for schema evolution.

iv) Improved performance: Using object based data model there can be significant
improvement in performance using object based data model.
Disadvantages:

i) Lack of universal data model: There is no universally agreed data model for an
object based data model, and most models lack a theoretical foundation.

ii) Lack of experience: In comparison with relational database management the use
of object based data models is limited. This model is more dependent on the skilled
programmer.

iii) Complex: More functionalities present in object based data models make the
design complex.

(4) Semi-structured data 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 Extensible Markup Language (XML) is widely used to represent semi-
structured data models.
Characteristics of semi-structured Data:

●​ Data does not conform to a data model but has some structure.
●​ Data can not be stored in the form of rows and columns as in Databases
●​ Semi-structured data contains tags and elements (Metadata) which is used to
group data and describe how the data is stored
●​ Similar entities are grouped together and organized in a hierarchy
●​ Entities in the same group may or may not have the same attributes or
properties
●​ Does not contain sufficient metadata which makes automation and management
of data difficult
●​ Size and type of the same attributes in a group may differ
●​ Due to lack of a well-defined structure, it can not used by computer programs
easily

Sources of semi-structured Data:

●​ E-mails
●​ XML and other markup languages
●​ Binary executables
●​ TCP/IP packets
●​ Zipped files
●​ Integration of data from different sources
●​ Web pages

Advantages:-

i) Data is not constrained by a fixed schema.

ii) It is flexible.

iii) It is portable.

Disadvantage:-

i) Queries are less efficient than other types of data model.

(5) Hierarchical Model


●​ In this model each entity has only one parent but can have several children. At
the top of the hierarchy there is only one node called root.
●​ This model represents the relationship in 1: N types. That means one university
can have multiple courses. One course can have multiple projects and so on.

Advantage:-
1. This model groups the data into tables and defines the relationship between the
tables.

Disadvantages:-
1. For searching any data, we have to start from the root and move downwards and
visit each child node. Thus traversing through each node is required.

2. In addition to some information about child nodes, sometimes the parent


information needs to be modified.

3. It fails to handle many to many relationships (M: N) efficiently. It can cause


duplication and data redundancy.

​ ​ Fig. Hierarchical model


(6) Network Model

●​ This is an enhanced version of hierarchical model.


●​ It overcomes the drawback of hierarchical models.
●​ It helps to address M: N relationships. That means, this model does not have a
single parent concept.
●​ Any child in this model can have multiple parents.
●​ The main difference between network model and hierarchical model is to allow
many to many relationships.

Fig. Network model


Advantages

1. Capability to handle more Relationships: Since the network model allows many to
many relationships, it helps in modeling the real life situations.

2. Ease of data access: The data access is easier and flexible than hierarchical models.

3. Data Integrity: In the network model every member is associated with some other
member in the model.
4. Conformance to Standards: The network model structure can be designed as per
the standards.

Disadvantages

1. Complex to implement: For all the records the pointers need to be maintained,
hence the database structure becomes complex.
2. Complicated Operations: The simple operations such as insertion, deletion and
modification become complex due to adjustment of multiple pointer.

3. Difficult to change structure: The structural changes are difficult.

Data Independence :

●​ Instance:Information stored in a database at a particular instance of time .


●​ Schema: The overall design of the database is called a database schema.
★​ Physical Schema:Lowest Level/Physical Level
★​ Logical Schema: At logical level
★​ Sub Schema : Highest level/View Level

●​ The ability to modify schema definition in one level without affecting the
schema definition in the next higher level is called data independence.

●​ There are two levels of Data Independence:


1.​ Physical Data Independence
2.​ Logical Data Independence

Logical Data Independence


●​ Logical data independence refers to the 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.
1.​ 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.
❖​ Components of DBMS:

The five major components of a database are:

1. Hardware

Hardware refers to the physical, electronic devices such as computers and hard disks
that offer the interface between computers and real-world systems.

2. Software

Software is a set of programs used to manage and control the database and includes
the database software, operating system, network software used to share the data with
other users, and the applications used to access the data.

3. Data

Data are raw facts and information that need to be organized and processed to make it
more meaningful. Database dictionaries are used to centralize, document, control, and
coordinate the use of data within an organization. A database is a repository of
information about a database (also called metadata).

4. Procedures

Procedures refer to the instructions used in a database management system and


encompass everything from instructions to setup and install, login and logout, manage
the day-to-day operations, take backups of data, and generate reports.

5. Database Access Language

Database Access Language is a language used to write commands to access, update,


and delete data stored in a database. Users can write commands using Database
Access Language before submitting them to the database for execution. Through
utilizing the language, users can create new databases, tables, insert data, and delete
data.

❖​ Overall Structure of DBMS:

●​ The typical structure of DBMS is based on the Relational data model.


●​ The top part of the architecture shows application interfaces used by naive
users, application programs created by application programmers, query tools used by
sophisticated users and administration tools used by database administrators.
●​ The lowest part of the architecture is for disk storage.

The Middle two parts(Query processor and storage manager) are important
components of database architecture.

1.​ Query processor:


The interactive query processor helps the database system to simplify and facilitate
access to data. It consists of DDL(Data Definition Language) interpreter, DML(Data
Manipulation Language) compiler and query evaluation engine.

The following are various functionalities and components of query processor


●​ DDL interpreter: This is basically a translator which interprets the DDL
statements in data dictionaries.

●​ DML compiler: It translates DML statements and query language into an


evaluation plan. This plan consists of the instructions which the query evaluation
engine understands.
●​ Query evaluation engine: It executes the low-level instructions generated by
the DML compiler.

When a user issues a query, the parsed query is presented to a query optimizer, which
uses information about how the data is stored to produce an efficient execution plan
for evaluating the query. An execution plan is a blueprint for evaluating a query. It is
evaluated by a query evaluation engine.

2.​Storage manager:
●​ Storage manager is the component of a database system that provides interface
between the low level data stored in the database and the application programs from
top level.
●​ Query processor processes the queasy and gives request to the next level, that is
storage manager , queries submitted to the system.
●​ This Storage manager has interaction with the file manager.
●​ The storage manager is responsible for storing, retrieving, and updating data in
the database. The storage manager components include

Components of Storage manager

●​ Authorization and integrity manager: Validates the users who want to access
the data and tests for integrity constraints.Integrity balance should not zero .
●​ Transaction manager: Ensures that the database remains consistent despite
system failures and concurrent transaction execution proceeds without conflicting.
●​ File manager: Manages allocation of space on disk storage and representation
of the information on disk.
●​ Buffer manager: Manages the fetching of data from disk storage into main
memory. The buffer manager also decides what data to cache in main memory. Buffer
manager is a crucial part of the database system.used for faster access of data.

Storage manager implements several data structures such as

●​ Data files: Used for storing the database itself.


●​ Data dictionary: Used for storing metadata, particularly schema of database.
●​ Indices: Indices are used to provide fast access to data items present in the
database
System Catalogs:
●​ The System Catalog in a Database Management System (DBMS) is a collection of
metadata that describes the database objects and their relationships.
●​ It is also known as the data dictionary or catalog. It is maintained by the DBMS
and is essential for its functioning, as it stores critical information about the
database structure and its components.

Components of System Catalog


1. Tables and Views:
Information about all tables, their columns, data types, constraints, and relationships.
Includes metadata about views defined in the database.

2. Indexes:
Details about indexes, including their names, types, and the tables/columns they are
associated with.

3. Users and Roles:


Information about users, roles, and their privileges in the database.

4. Schemas:
Definitions of schemas and the objects they contain.

5. Constraints:
Metadata about primary keys, foreign keys, unique constraints, and check constraints.

6. Stored Procedures and Triggers:


Details about stored procedures, functions, triggers, and their definitions.

7. Storage Information:
Data about physical storage, such as tablespaces, files, and allocation details.

8. Statistics:
Metadata about table sizes, index usage, query optimization statistics, etc.
Uses of System Catalog
1. Query Optimization:
The catalog provides the optimizer with statistics to choose the best query execution
plan.

2. Integrity and Constraints:


It ensures that data integrity and constraints are enforced during transactions.

3. Access Control:
Manages permissions and access rights for users and roles.

4. Database Management:
Facilitates database maintenance tasks, such as backup and recovery.

5. System Administration:
Helps database administrators (DBAs) monitor and tune database performance.

Multi User DBMS Architecture


●​ Databases are used in organizing, storing, and retrieving data for various
purposes in different categories of uses range from personal uses to large
business uses.
●​ There are two ways to classify database systems that are the number of users
allowed to access and modify the data concurrently.
●​ Principal distinctions are based on the number of users and can be subdivided
into two: single-user and multi-user systems.
●​ It is crucial in this case to understand the difference between these two because
that will help in determining with which system a given application should be
compatible.

Single-User Database Systems

●​ A single-user database system is designed to be used by only one user at a time.


It is typically installed on a single computer and can only be accessed by the
user who installed it or the user who is currently logged in.
●​ Single-user systems are simpler and less expensive than multi-user systems, but
they are not suitable for environments where multiple users need to access the
same data at the same time.

Example: Personal Computers

Advantages of Single-User Database Systems

●​ Simplicity: Straight-forward to purchase, use, and maintain since only the user
has an interface with the system.
●​ Lower Costs: Due to the low demand for Resource-hogging hardware and
efficient software, Single-user systems sometimes prove to be cost-effective.
●​ Less Complexity: When there is only one user involved in the use of the
application there tends to be no issues related to conflicting users or
simultaneous access to the data.

Disadvantages of Multi-User Database Systems

●​ Limited Scalability: These systems are strictly for the single user, which makes
them unsuitable to be used in large organizations.
●​ Lower Efficiency for Collaboration: This makes the database unsuitable for the
environment where the simultaneous use of the database by several users is
necessary since only one user can have access to the database at a certain time.
●​ Not Ideal for Large Data Handling: It is worth noting that most of these
databases are applied in small scale systems which may not efficiently manage
huge data.

Multi-User Database Systems

●​ A multi-user database system, on the other hand, can be accessed by multiple


users simultaneously.
●​ It is typically installed on a network server and can be accessed by users who
are logged in to the network.
●​ Multi-user systems are more complex and require more resources than
single-user systems, but they are essential for organizations where multiple
users need to access the same data at the same time.
Example: Databases of Banks, insurance agencies, stock exchanges, supermarkets,
etc.

Advantages of Multi-User Database Systems

●​ Concurrency: Since they do not require exclusive rights to the database, more
than one user can work on it at the same time and hence boost productivity.
●​ Scalability: Such systems can support a widely ranging population as well as
support large amounts of information to suit commercial and corporate uses.
●​ Data Consistency and Integrity: Transaction control capabilities offered by
programs guarantee the consistency of data, and when the data is stored using
this technique, even when done by different people, it will not be compromised.

Disadvantages of Multi-User Database Systems

●​ Higher Complexity: Such systems are much more challenging to administer and
support because of the numerous user disputes, data integrity and concurrent
access.
●​ Cost: The Multi-User Systems may involve the use of costly colossal, effective
and efficient hardware and software and firm network connections.
●​ Performance Overhead: The risk that arises out of having a number of users
accessing the system is that this leads to slow system response time if for
instance the back-end database is not well optimized or if there is inadequate
allocation of system resources.

❖​
Data Modeling:
Basics Concepts
Entity
Attributes
Relationships
Constraints
Keys
●​ Data modeling is the process of creating a visual representation of a system's
data.The basic concepts of data modeling include entities, attributes,
relationships, constraints, and keys.
●​ Entities Represent real-world objects or concepts. For example, an employee is
an entity in an employee database.
●​ Attributes Describe the characteristics of an entity. For example, age, roll
number, or marks for a student.
●​ Relationships Define the connections between entities. For example, a
one-to-one relationship is when only one instance of an entity is associated with
another entity.
●​ Constraints Rules that help maintain data integrity and consistency. For
example, primary key constraints, unique constraints, and foreign key
constraints.
●​ Keys Unique identifiers used to distinguish individual instances of an entity.
For example, a roll number can uniquely identify a student from a set of
students.
●​ Data models Can be conceptual, logical, physical, relational, hierarchical,
network, object-oriented, or graph data model

You might also like