0% found this document useful (0 votes)
39 views35 pages

DBMS Complete Notes-1-35

This document discusses data, information, records, files and database management systems. It begins by defining data and how computers store and measure data. It then discusses the differences between data and information, with information being processed data that has meaning. The document notes that data is organized into bits, fields, records and files within a database management system. It provides examples of traditional file-based systems and shared file systems, noting limitations of both approaches.
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)
39 views35 pages

DBMS Complete Notes-1-35

This document discusses data, information, records, files and database management systems. It begins by defining data and how computers store and measure data. It then discusses the differences between data and information, with information being processed data that has meaning. The document notes that data is organized into bits, fields, records and files within a database management system. It provides examples of traditional file-based systems and shared file systems, noting limitations of both approaches.
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/ 35

Unit – 1

DATABASE MANAGEMENT SYSTEM


Data is information such as facts and numbers used to analyze something or make decisions. Computer data
is information in a form that can be processed by a computer.
Data can come in the form of text, observations, figures, images, numbers, graphs, or symbols. For
example, data might include individual prices, weights, addresses, ages, names, temperatures, dates, or
distances. Data is a raw form of knowledge and, on its own, doesn't carry any significance or purpose.

How data is stored


Computers represent data, including video, images, sounds and text, as binary values using patterns of just
two numbers: 1 and 0. A bit is the smallest unit of data, and represents just a single value. A byte is eight
binary digits long. Storage and memory is measured in megabytes and gigabytes. The units of data
measurement continue to grow as the amount of data collected and stored grows.

Types of data
Growth of the web and smartphones over the past decade led to a surge in digital data creation. Data now
includes text, audio and video information, as well as log and web activity records. Much of that is
unstructured data.
The term big data has been used to describe data in the petabyte range or larger. Data is the raw material that
can be processed by any computing machine. Data can be represented in the form of:

Information is data that has been processed in such a way as to be meaningful to the person who receives it.
It is anything that is communicated.
Data is the term, that may be new to beginners, but it is very interesting and simple to understand. It can be
anything like name of a person or a place or a number etc. Data is the name given to basic facts and entities
such as names and numbers. The main examples of data are weights, prices, costs, numbers of items sold,
employee names, product names, addresses, tax codes, registration marks etc.

Information
Information is data that has been converted into a more useful or intelligible form. It is the set of data that has
been organized for direct utilization of mankind, as information helps human beings in their decision making
process. Examples are: Time Table, Merit List, Report card, Headed tables, printed documents, pay slips,
receipts, reports etc. The information is obtained by assembling items of data into a meaningful form. For
example, marks obtained by students and their roll numbers form data, the report card/sheet is the
.information. Other forms of information are pay-slips, schedules, reports, worksheet, bar charts, invoices and
account returns etc. It may be noted that information may further be processed and/or manipulated to form
knowledge. Information containing wisdom is known as knowledge.
Need of Information
Modem civilization has become so complicated and sophisticated that to survive one has to be competitive.
This compels the people to keep himself informed of all types of happenings in the society. With the advent
of educational reforms in society, mankind is surrounded with a vast amount of data available. Modem
business management system has also rendered itself to bulk collection of data from various sources that needs
to be rearranged in a fashion so that it can be utilized with minimum possible time. This needs a high amount
of filing either at data stage or at information stage. No office can be without files. If you go to any tax
collection department or municipal office you will find a high amount of files stacked here and there.

Information is needed to:


• To gain knowledge about the surroundings, and whatever is happening in the society and universe.
• To keep the system up to date.
• To know about the rules and regulations and bye laws of society, local government, provincial and central
government, associations, clients etc. as ignorance is no bliss.
• Based on above three, to arrive at a particular decision for planning current and prospective actions in process
of forming, running and protecting a process or system

Difference between Information and Data:


S.NO DATA INFORMATION

Data are the variables that help to develop


ideas/conclusions.
1 Information is meaningful data.

2 Data are text and numerical values. Information is refined form of actual data.

3 Data doesn’t rely on Information. While Information relies on Data.

Information is measured in meaningful units like


time, quantity, etc.
4 Bits and Bytes are the measuring unit of data.

Data can be easily structured as the following: Information can also be structured as the
1.Tabular data 2.Graph 3.Data tree following: 1. Language 2. Ideas 3. Thoughts
5

Information carries a meaning that has been


assigned by interpreting data.
6 Data does not have any specific purpose

7 It is low-level knowledge. It is the second level of knowledge.

Data does not directly helps in decision making.


8 Information directly helps in decision making.
Data is collection of facts, which it self have no
9 meaning. Information puts those facts into context.
S.NO DATA INFORMATION
Example of information is average score of class
10 Example of data is student test score. that is derived from given data.

RECORDS AND FILES

Data are the principal resources of an organization. Data stored in computer systems form a hierarchy
extending from a single bit to a database, the major record-keeping entity of a firm. Each higher rung of this
hierarchy is organized from the components below it.

Data are logically organized into:

1. Bits (characters)
2. Fields
3. Records
4. Files
5. Databases

Traditional file-based approach


The term 'file-based approach' refers to the situation where data is stored in one or more separate computer
files defined and managed by different application programs. Typically, for example, the details of customers
may be stored in one file, orders in another, etc. Computer programs access the stored files to perform the
various tasks required by the business. Each program, or sometimes a related set of programs, is called a
computer application. For example, all of the programs associated with processing customers' orders are
referred to as the order processing application. The file-based approach might have application programs that
deal with purchase orders, invoices, sales and marketing, suppliers, customers, employees, and so on.
Limitations
• Data duplication: Each program stores its own separate files. If the same data is to be accessed by
different programs, then each program must store its own copy of the same data.
• Data inconsistency: If the data is kept in different files, there could be problems when an item of data
needs updating, as it will need to be updated in all the relevant files; if this is not done, the data will be
inconsistent, and this could lead to errors. • Difficult to implement data security: Data is stored in
different files by different application programs.
This makes it difficult and expensive to implement organisation-wide security procedures on the data.
The following diagram shows how different applications will each have their own copy of the files they need
in order to carry out the activities for which they are responsible:
Figure 1.1

The shared file approach


One approach to solving the problem of each application having its own set of files is to share files between
different applications. This will alleviate the problem of duplication and inconsistent data between different
applications, and is illustrated in the diagram below:

Figure 1.2
The introduction of shared files solves the problem of duplication and inconsistent data across different
versions of the same file held by different departments, but other problems may emerge, including:
• File incompatibility: When each department had its own version of a file for processing, each
department could ensure that the structure of the file suited their specific application. If departments
have to share files, the file structure that suits one department might not suit another. For example,
data might need to be sorted in a different sequence for different applications (for instance, customer
details could be stored in alphabetical order, or numerical order, or ascending or descending order of
customer number). • Difficult to control access: Some applications may require access to more data
than others; for instance, a credit control application will need access to customer credit limit
information, whereas a delivery note printing application will only need access to customer name and
address details. The file will still need to contain the additional information to support the application
that requires it.
• Physical data dependence: If the structure of the data file needs to be changed in some way (for
example, to reflect a change in currency), this alteration will need to be reflected in all application
programs that use that data file. This problem is known as physical data dependence, and will be
examined in more detail later in the chapter.
• Difficult to implement concurrency: While a data file is being processed by one application, the file
will not be available for other applications or for ad hoc queries. This is because, if more than one
application is allowed to alter data in a file at one time, serious problems can arise in ensuring that the
updates made by each application do not clash with one another. This issue of ensuring consistent,
concurrent updating of information is an extremely important one, and is dealt with in detail for
database systems in the chapter on concurrency control. File-based systems avoid these problems by
not allowing more than one application to access a file at one time.
The systems that are used to organize and maintain data files are known as file based data systems. These file
systems are used to handle a single or multiple files and are not very efficient.
Functionalities
The functionalities of a File-based Data Management System are as follows −
• A file based system helps in basic data management for any user.
• The data stored in the file based system should remain consistent. Any transactions done in the file
based system should not alter the consistency property.
• The file based system should not allow any illegal or potentially hazardous operations to occur on the
data.
• The file based system should allow concurrent access by different processes and this should be carefully
coordinated.
• The file based system should make sure that the data is uniformly structured and stored so it is easier
to access it.
Advantages of File Based System
• The file Based system is not complicated and is simpler to use.
• Because of the above point, this system is quite inexpensive.
• Because the file based system is simple and cheap, it is normally suitable for home users and owners
of small businesses.
• Since the file based system is used by smaller organisations or individual users, it stores comparatively
lesser amount of data. Hence, the data can be accessed faster and more easily.
Disadvantages of File Based System
• The File based system is limited to a smaller size and cannot store large amounts of data.
• This system is relatively uncomplicated but this means it cannot support complicated queries, data
recovery etc.
• There may be redundant data in the file based system as it does not have a complex mechanism to get
rid of it.
• The data is not very secure in a file based system and may be corrupted or destroyed.
• The data files in the file based system may be stored across multiple locations. Consequently, it is
difficult to share the data easily with multiple users.

Database Approach
The database approach is an improvement on the shared file solution as the use of a database management
system (DBMS) provides facilities for querying, data security and integrity, and allows simultaneous access
to data by a number of different users. At this point we should explain some important terminology:
• Database: A database is a collection of related data.
• Database management system: The term 'database management system', often abbreviated to DBMS,
refers to a software system used to create and manage databases. The software of such systems is
complex, consisting of a number of different components, which are described later in this chapter.
The term database system is usually an alternative term for database management system.
• System catalogue/Data dictionary: The description of the data in the database management system.
• Database application: Database application refers to a program, or related set of programs, which use
the database management system to perform the computer-related tasks of a particular business
function, such as order processing.
One of the benefits of the database approach is that the problem of physical data dependence is resolved; this
means that the underlying structure of a data file can be changed without the application programs needing
amendment. This is achieved by a hierarchy of levels of data specification. Each such specification of data in
a database system is called a schema. The different levels of schema provided in database systems are
described below. Further details of what is included within each specific schema are discussed later in the
chapter.
The Systems Planning and Requirements Committee of the American National Standards Institute
encapsulated the concept of schema in its three-level database architecture model, known as the ANSI/SPARC
architecture, which is shown in the diagram below:
Figure 1.3
Various Characteristics of Database Approach

The database approach is far more efficient and robust than the traditional file management system. Let's
discuss the characteristics of the Database Approach. But before moving to the characteristics of the
Database Approach, let's have a sample database of Students enrolled in a university.

ROLL_NO NAME DEPARTMENT

901 Amit CSE


ROLL_NO NAME DEPARTMENT

835 Anant ECE

908 Deepak CSE

704 Hari EE

516 Karan CE
Self-Describing Nature of a Database System

In the traditional file management system, data definition was not a part of the application, but in the
database approach, the data is defined by the users and this defined data describes itself. It means that the
metadata or data about data is also stored in the database, specifically in the DBMS catalog.

Metadata means data about data, like the constraints in the database, the structure of the database, the
columns of the database, etc. In the introduction section, we used the STUDENTS database and in the
STUDENTS database ROLL_NO acts as the primary key, hence the information that "ROLL_NO is the
primary key of STUDENTS" is the metadata of the STUDENTS database.

Insulation between Programs and Data, and Data Abstraction

Suppose we want to change the structure of the STUDENTS database by adding a new column of
MOBILE_NO. Now in the file management system, we may require to update the structure of the
STUDENTS database in every program that is accessing this database. But this is not the issue with
the Database Approach.

In the database approach, the structure of the database is stored in the DBMS catalog. So next time when we
will access the data, the new structure from the DBMS catalogue will be used.

The DBMS or Database Management System provides the conceptual view of the data that is easily
readable to the user and hides many details of the data such as how the data is stored or the constraints used
on the data. This conceptual view is known as the data model. Hence the data model hides the
implementation and storage details of the data thus creating insulation between the program and the data.

For example following details of the STUDENTS database will be shown to the user,

ROLL_NO, NAME, DEPARTMENT

and the following details will not be shown as these are unnecessary for the user,

ROLL_NO is INT,

NAME is VARCHAR,

DEPARTMENT is VARCHAR

Support of Multiple Views of the Data

In a university portal there can be many types of users such as students, teachers, heads of department,
deans, etc. So having a separate database for each type of user will lead to repetition of the data and wastage
of resources.
In the Database Approach, a single database is implemented and multiple users access this database. For
example for the STUDENTS database, the Head of the Department of CSE will only access the students
having CSE as their department, the dean can access the student details of every student in the STUDENTS
database.

Sharing of Knowledge and Multi-user Transaction Processing

Sharing of knowledge means that multiple users are accessing common data like a dean and the head of the
department are accessing the STUDENTS database. Hence both users are sharing the student records.

A transaction is a process that is accessing one or more databases by reading, writing, or deleting the data
records.

Multi-user Transaction Processing as the name implies that the database must allow multiple users to
process their respective transactions. But it should also ensure that the transactions are processed
concurrently so that multiple users can't change a record at the same instant. For example, consider a Movie
Ticket Booking scenario where the DBMS should ensure that only one user can book a seat at a given
instant.

Security

A database should be secure so that it remains protected from any internal or external threats. Security
comprises safeguarding the database, the data contained inside it, the database management system, and the
different applications that utilize the database. Consider a case where a user is trying to update some records
in the database as follows,

At 10:45, the user begins to update the records.

At 10:47, the database experiences a power failure while the user was updating the records.

So when the power is restored the transaction should start from the beginning i.e. the state of the database
should be 10:45, not 10:47. Either the transaction is completed or it is not completed, there can't be a
partially completed transaction.

Query Language

A query in the database is a request for data from the database so that we can read, write, or delete the data
in the database. A query performs similar action to that of the CRUD (Create, Read, Update, Delete)
operation. A query allows us to access specific data from the database based on some conditions or
constraints.

For example, if the Head of the Department of CSE is trying to fetch student details from the STUDENTS
database, then we will perform the query as,

SELECT * FROM STUDENTS WHERE DEPARTMENT = "CSE";

The above query will return us to the following table,


ROLL_NO NAME DEPARTMENT

901 Amit CSE

908 Deepak CSE

Bridge between Program and Data


The bridge between Program and Data is Data Abstraction or hiding unnecessary data from the user. In data
abstraction, we hide unnecessary details such as the type of values, number of columns, the structure of the
database, etc are hidden from the user. These details are very crucial for the database admin but not for
normal users.

Advantages of DBMS
The advantages of the DBMS are explained below −
• Redundancy problem can be solved.
In the File System, duplicate data is created in many places because all the programs have their own files
which create data redundancy resulting in wastage of memory. In DBMS, all the files are integrated in a single
database. So there is no chance of duplicate data.
For example: A student record in a library or examination can contain duplicate values, but when they are
converted into a single database, all the duplicate values are removed.
• Has a very high security level.
Data security level is high by protecting your precious data from unauthorized access. Only authorized users
should have the grant to access the database with the help of credentials.
• Presence of Data integrity.
Data integrity makes unification of so many files into a single file. DBMS allows data integrity which makes
it easy to decrease data duplicity Data integration and reduces redundancy as well as data inconsistency.
• Support multiple users.
DBMS allows multiple users to access the same database at a time without any conflicts.
• Avoidance of inconsistency.
DBMS controls data redundancy and also controls data consistency. Data consistency is nothing but if you
want to update data in any files then all the files should not be updated again.
In DBMS, data is stored in a single database so data becomes more consistent in comparison to file processing
systems.
• Shared data
Data can be shared between authorized users of the database in DBMS. All the users have their own right to
access the database. Admin has complete access to the database. He has a right to assign users to access the
database.
• Enforcement of standards
As DBMS have central control of the database. So, a DBA can ensure that all the applications follow some
standards such as format of data, document standards etc. These standards help in data migrations or in
interchanging the data.
• Any unauthorized access is restricted
Unauthorized persons are not allowed to access the database because of security credentials.
• Provide backup of data
Data loss is a big problem for all the organizations. In the file system users have to back up the files in regular
intervals which lead to waste of time and resources.
DBMS solves this problem of taking backup automatically and recovery of the database.
Tunability
Tuning means adjusting something to get a better performance. Same in the case of DBMS, as it provides
tunability to improve performance. DBA adjusts databases to get effective results.
Disadvantages of DBMS
The disadvantages of DBMS are as follows:
• Complexity
The provision of the functionality that is expected of a good DBMS makes the DBMS an extremely complex
piece of software. Database designers, developers, database administrators and end-users must understand this
functionality to take full advantage of it.
Failure to understand the system can lead to bad design decisions, which leads to a serious consequence for
an organization.
• Size
The functionality of DBMS makes use of a large piece of software which occupies megabytes of disk space.
• Performance
Performance may not run as fast as desired.
• Higher impact of a failure
The centralization of resources increases the vulnerability of the system because all users and applications
rely on the availability of DBMS, the failure of any component can bring operation to halt.
• Cost of DBMS
The cost of DBMS varies significantly depending on the environment and functionality provided. There is
also the recurrent annual maintenance cost.

Components of DBMS
The database management system can be divided into five major components, they are:

1. Hardware
2. Software
3. Data
4. Procedures
5. Database Access Language
6. Users/People

Hardware

When we say Hardware, we mean computer, hard disks, I/O channels for data, and any other physical
component involved before any data is successfully stored into the memory.
When we run Oracle or MySQL on our personal computer, then our computer's Hard Disk, our Keyboard
using which we type in all the commands, our computer's RAM, ROM all become a part of the DBMS
hardware.
Software

This is the main component, as this is the program which controls everything. The DBMS software is more
like a wrapper around the physical database, which provides us with an easy-to-use interface to store, access
and update data.

The DBMS software is capable of understanding the Database Access Language and intrepret it into actual
database commands to execute them on the DB.

Data

Data is that resource, for which DBMS was designed. The motive behind the creation of DBMS was to store
and utilise data.

In a typical Database, the user saved Data is present and meta data is stored. Metadata is data about the data.
This is information stored by the DBMS to better understand the data stored in it.

For example: When I store my Name in a database, the DBMS will store when the name was stored in the
database, what is the size of the name, is it stored as related data to some other data, or is it independent, all
this information is metadata.

Procedures

Procedures refer to general instructions to use a database management system. This includes procedures to
setup and install a DBMS, To login and logout of DBMS software, to manage databases, to take backups,
generating reports etc.

Database Access Language

Database Access Language is a simple language designed to write commands to access, insert, update and
delete data stored in any database.

A user can write commands in the Database Access Language and submit it to the DBMS for execution,
which is then translated and executed by the DBMS. User can create new databases, tables, insert data, fetch
stored data, update data and delete the data using the access language.

Users

• Database Administrators: Database Administrator or DBA is the one who manages the complete
database management system. DBA takes care of the security of the DBMS, it's availability,
managing the license keys, managing user accounts and access etc.

• Application Programmer or Software Developer: This user group is involved in developing and
desiging the parts of DBMS.

• End User: These days all the modern applications, web or mobile, store user data. How do you think
they do it? Yes, applications are programmed in such a way that they collect user data and store the
data on DBMS systems running on their server. End users are the one who store, retrieve, update and
delete data.

Database Languages/SQL commands

1. Data Definition Language (DDL)

o DDL changes the structure of the table like creating a


table, deleting a table, altering a table, etc. o All the
command of DDL are auto-committed that means it
permanently save all the changes in the database.

Here are some commands that come under DDL:

o CREATE o ALTER o DROP o


TRUNCATE

a. CREATE It is used to create a new table in the database.

Syntax:

1. CREATE TABLE TABLE_NAME (COLUMN_NAME DATATYPES[,....]);

Example:

1. CREATE TABLE EMPLOYEE(Name VARCHAR2(20), Email VARCHAR2(100), DOB DATE);

b. DROP: It is used to delete both the structure and record stored in the table.

Syntax

1. DROP TABLE table_name;

Example

1. DROP TABLE EMPLOYEE;


c. ALTER: It is used to alter the structure of the database. This change could be either to modify the
characteristics of an existing attribute or probably to add a new attribute.

Syntax:

To add a new column in the table

1. ALTER TABLE table_name ADD column_name COLUMN-definition;

To modify existing column in the table:

1. ALTER TABLE table_name MODIFY(column_definitions....);

EXAMPLE

1. ALTER TABLE STU_DETAILS ADD(ADDRESS VARCHAR2(20));


2. ALTER TABLE STU_DETAILS MODIFY (NAME VARCHAR2(20));

d. TRUNCATE: It is used to delete all the rows from the table and free the space containing the table.

Syntax:

1. TRUNCATE TABLE table_name;

Example:

1. TRUNCATE TABLE EMPLOYEE;

2. Data Manipulation Language

o DML commands are used to modify the database. It is responsible for all form of changes in the
database.
o The command of DML is not auto-committed that means it can't permanently save all the changes in
the database. They can be rollback.

Here are some commands that come under DML:

o INSERT o UPDATE o DELETE

a. INSERT: The INSERT statement is a SQL query. It is used to insert data into the row of a table.

Syntax:

1. INSERT INTO TABLE_NAME


2. (col1, col2, col3,.... col N)
3. VALUES (value1, value2, value3, .... valueN);

Or
1. INSERT INTO TABLE_NAME
2. VALUES (value1, value2, value3, .... valueN);

For example:

1. INSERT INTO javatpoint (Author, Subject) VALUES ("Sonoo", "DBMS");

b. UPDATE: This command is used to update or modify the value of a column in the table.

Syntax:

1. UPDATE table_name SET [column_name1= value1,...column_nameN = valueN] [WHERE CONDITION]

For example:

1. UPDATE students
2. SET User_Name = 'Sonoo'
3. WHERE Student_Id = '3'

c. DELETE: It is used to remove one or more row from a table.

Syntax:

1. DELETE FROM table_name [WHERE condition];

For example:

1. DELETE FROM javatpoint


2. WHERE Author="Sonoo";

3. Data Control Language

DCL commands are used to grant and take back authority from any database user.

Here are some commands that come under DCL:

Gra
nt o

Re
voke

a. Grant: It is used to give user access privileges to a database.

Example

1. GRANT SELECT, UPDATE ON MY_TABLE TO SOME_USER, ANOTHER_USER;


b. Revoke: It is used to take back permissions from the user.

Example

1. REVOKE SELECT, UPDATE ON MY_TABLE FROM USER1, USER2;

4. Transaction Control Language

TCL commands can only use with DML commands like INSERT, DELETE and UPDATE only.

These operations are automatically committed in the database that's why they cannot be used while creating
tables or dropping them.

Here are some commands that come under TCL:

COMMI
To
ROLLBA
CK o
SAVEPO
INT

a. Commit: Commit command is used to save all the transactions to the database.

Syntax:

1. COMMIT;

Example:

1. DELETE FROM CUSTOMERS


2. WHERE AGE = 25;
3. COMMIT;

b. Rollback: Rollback command is used to undo transactions that have not already been saved to the
database.

Syntax:

1. ROLLBACK;

Example:

1. DELETE FROM CUSTOMERS


2. WHERE AGE = 25;
3. ROLLBACK;
c. SAVEPOINT: It is used to roll the transaction back to a certain point without rolling back the entire
transaction.

Syntax:

1. SAVEPOINT SAVEPOINT_NAME;

5. Data Query Language

DQL is used to fetch the data from the database.

It uses only one command:

o SELECT

a. SELECT: This is the same as the projection operation of relational algebra. It is used to select the
attribute based on the condition described by WHERE clause.

Syntax:

1. SELECT expressions
2. FROM TABLES
3. WHERE conditions;

For example:

1. SELECT emp_name
2. FROM employee
3. WHERE age > 20;

DATABASE ADMINISTRATOR

Database administrator is a person who creates updates and maintains the database. It is more of a wide
role as a data administrator might be someone who is hired to create, maintain, and backup the database,
optimize the database for high performance, or someone who helps in integrating databases into
applications. The major skills required to be an excellent database administrator are troubleshooting,
logical thought process, and a strong will to learn as it involves a vast area. This role is also known as
Database Coordinator or Database Programmer.

Responsibilities :
• Create and design a database
• Analyze and monitor database requirements
• Ensures data security

Different types of DBAs


There are several types of database administrators, each with specific duties and responsibilities. The most
common types of DBAs include system administrators, database architects, database analysts, data modelers,
application DBAs, task-oriented DBAs, performance analysts, data warehouse administrators, and cloud DBAs.
• System administrators are responsible for the overall management and upkeep of a computer system,
including installing and configuring software, applying security patches, and monitoring system performance.
• Database architects design databases to meet the specific needs of an organization.
• Database analysts collect and analyze data to help improve database performance. They may also be
responsible for developing reports and providing recommendations to database administrators.
• Data modelers create and maintain data models that depict the relationship between data elements. Data
modeling is a critical component of effective database design.
• Application DBAs are responsible for administrating databases that support applications. Specific tasks
include installing and configuring applications, ensuring that data is synchronized correctly between
databases, and troubleshooting application-related issues.
• Task-oriented DBAs focus on a particular area of database administration, such as backup and recovery,
security, or performance tuning. They typically have in-depth knowledge of a specific database
management system (DBMS).
• Performance analysts monitor database performance and identify areas where improvement is needed.
They may also be responsible for creating performance reports and providing recommendations to
database administrators.
• Data warehouse administrators manage databases that store data for business intelligence or
decisionsupport applications. They are responsible for extracting data correctly, transforming the data,
and loading it into the data warehouse.
• Cloud DBAs are responsible for administrating databases hosted in a cloud computing environment,
provisioning and managing database instances, setting up replication and high availability, and
monitoring database performance.

Database Designers

A database designer, sometimes called a database architect or a data officer, is responsible for designing
the databases in an organization. He/she carefully evaluates the business requirements and drafts the data
models. Then, initial discussions with the business occur to validate the understanding of the data and
the business processes. A database designer’s job also includes preparing supporting documentation
when building the physical database.

A database designer is in charge of designing, developing, executing and preserving a company's data
management systems. One of the most important responsibilities of a database designer is to form
relationships between various elements of data and give it a logical structure.

Key Responsibilities Of A Database Designer


• Understand the organisation's data to skillfully carry out the company's database design projects
• Install and configure relational database management system on the company's server
• Design database schemas and create databases for varied projects of the company
• Handle the creation of new users, define roles and privileges and grant access to them
• Assist application development teams to easily connect to the databases
• Track the performance of the databases and fix issues quickly to facilitate smooth functioning
• Use the best techniques for enhanced scalability and efficiency of large databases
• Understand complex problems, devise solutions and transform them into software requirements
• Conduct data research and query large and complex datasets to provide the best data modelling
Application Developer
An application developer is a software engineer who designs, creates, tests, programs and updates applications
for a particular device like mobile or web or a specific operating system. Application developers typically
specialise in one area of development, like a mobile phone application. They are also involved in performing
regular updates on applications and releasing the latest update to the end-users. They are an important part of
the project management or technical team that is responsible for meeting user needs.

Roles and responsibilities are:

• Analyze the ideas, business models, and user requirements to formulate a design strategy to carry out.
• Act as a tenant to draw out a workable application design and coding parameters with the essential
functionalities
• Breakdown the process into multiple packets to distribute to other relevant technology project teams
• Develop various process flow diagrams and working models to streamline the process
• Coordinate the development cycle and attest the compatibility of different modules
• Supervise and conduct the performance test and trials to ensure a hassle-free user experience
• Records and document each phase of application development for further reference and maintenance
operation
• Deploy and install the applications to demonstrate the successful performance of software as per the
client expectation
• Fix the problems arising across the test cycles and continuously improves the quality of deliverables
• Communicate with other application development partners and technology arbiters to deliver excellent
output

There are a number of users who can access or retrieve the data on demand using the application and the
interfaces provided by the Database Management System (DBMS).
Types of Users
The users of the database can be classified into the following groups −
Native users − The native users need not be aware of the presence of the database system. They are end users
of the database who works through a menu driven application programs, where the type and range of response
is always indicated to the user
Online users − Online users may communicate with databases directly through an online terminal or
indirectly through user interface and application programs.
Sophisticated Users − They are those users who interact with the system without writing the program instead
they form their request in database query language. They are the SQL programmers, who are going to deal
directly with the database. They write queries to delete or select or insert and update the database.
Specialized Users − Specialized users who write specialized database applications that do not fit into the
fractional database processing framework.
Application Programmer − The application programmer users who are responsible for developing the
application programs or user interface. The application programs could be written in high level language. For
example − Java, .net, php etc,
Database Administrator (DBA) − It is a person or the group in charge of implementing the database system
within the organization. The DBA has all the privileges allowed by the DBMS and can assign or remove the
privileges from the users.
Classification of Users
DBMS mainly classified into three users −
• End Users.
• Application Programmers.
• Database Administrator.
The classification of users in DBMS is pictorially represented below −
UNIT – 2

DBMS
DBMS Architecture

o The DBMS design depends upon its architecture. The basic client/server architecture is used to deal with a large number of PCs, web servers, database
servers and other components that are connected with networks.
o The client/server architecture consists of many PCs and a workstation which are connected via the network. o DBMS architecture depends upon how

users are connected to the database to get their request done. Types of DBMS Architecture

Database architecture can be seen as a single tier or multi-tier. But logically, database architecture is of two types like: 2-tier architecture and 3-tier
architecture.

1-Tier Architecture
o In this architecture, the database is directly available to the user. It means the user can directly sit on the DBMS and uses it.
o Any changes done here will directly be done on the database itself. It doesn't provide a handy tool for end users.
o The 1-Tier architecture is used for development of the local application, where programmers can directly communicate with the database for the quick
response.
2-Tier Architecture

o The 2-Tier architecture is same as basic client-server. In the two-tier architecture, applications on the client end can directly communicate with the
database at the server side. For this interaction, API's like: ODBC, JDBC are used.
o The user interfaces and application programs are run on the client-side. o The server side is responsible to provide the functionalities like: query
processing and transaction management. o To communicate with the DBMS, client-side application establishes a connection with the server side.

Fig: 2-tier Architecture

3-Tier Architecture

o The 3-Tier architecture contains another layer between the client and server. In this architecture, client can't directly communicate with the server. o
The application on the client-end interacts with an application server which further communicates with the database system.
o End user has no idea about the existence of the database beyond the application server. The database also has no idea about any other user beyond the
application.
o The 3-Tier architecture is used in case of large web application.

Fig: 3-tier Architecture

Three Levels of Architecture, External, Conceptual and Internal Levels


Database systems comprise of complex data structures. Thus, to make the system efficient for retrieval of data and reduce the complexity of the users,
developers use the method of Data Abstraction.

There are mainly three levels of data abstraction:

1. Internal Level: Actual PHYSICAL storage structure and access paths.


2. Conceptual or Logical Level: Structure and constraints for the entire database
3. External or View level: Describes various user views
Internal Level/Schema
The internal schema defines the physical storage structure of the database. The internal schema is a very low-level representation of the entire database. It
contains multiple occurrences of multiple types of internal record. In the ANSI term, it is also called “stored record’.

Facts about Internal schema:

• The internal schema is the lowest level of data abstraction


• It helps you to keeps information about the actual representation of the entire database. Like the actual storage of the data on the disk in the form of
records
• The internal view tells us what data is stored in the database and how
• It never deals with the physical devices. Instead, internal schema views a physical device as a collection of physical pages

Conceptual Schema/Level
The conceptual schema describes the Database structure of the whole database for the community of users. This schema hides information about the physical
storage structures and focuses on describing data types, entities, relationships, etc.

This logical level comes between the user level and physical storage view. However, there is only single conceptual view of a single database.

Facts about Conceptual schema:

• Defines all database entities, their attributes, and their relationships • Security and integrity information
• In the conceptual level, the data available to a user must be contained in or derivable from the physical level
External Schema/Level
An external schema describes the part of the database which specific user is interested in. It hides the unrelated details of the database from the user. There may
be “n” number of external views for each database.

Each external view is defined using an external schema, which consists of definitions of various types of external record of that specific view.

An external view is just the content of the database as it is seen by some specific particular user. For example, a user from the sales department will see only
sales related data.

Facts about external schema:

• An external level is only related to the data which is viewed by specific end users.
• This level includes some external schemas.
• External schema level is nearest to the user
• The external schema describes the segment of the database which is needed for a certain user group and hides the remaining details from the database
from the specific user group

Goal of 3 level/schema of Database


Here, are some Objectives of using Three schema Architecture:

• Every user should be able to access the same data but able to see a customized view of the data.
• The user need not to deal directly with physical database storage detail.
• The DBA should be able to change the database storage structure without disturbing the user’s views
• The internal structure of the database should remain unaffected when changes made to the physical aspects of storage.
Instances:
Instances are the collection of information stored at a particular moment. The instances can be changed by certain CRUD operations as like addition, deletion of
data. It may be noted that any search query will not make any kind of changes in the instances.
Example –
Let’s say a table teacher in our database whose name is School, suppose the table has 50 records so the instance of the database has 50 records for now
and tomorrow we are going to add another fifty records so tomorrow the instance have total 100 records. This is called an instance.

Schema:
Schema is the overall description of the database. The basic structure of how the data will be stored in the database is called schema.
Schema is of three types: Logical Schema, Physical Schema and view Schema.
1. Logical Schema – It describes the database designed at logical level.
2. Physical Schema – It describes the database designed at physical level.
3. View Schema – It defines the design of the database at the view level.

Example –
Let’s say a table teacher in our database name school, the teacher table require the name, dob, doj in their table so we design a structure as :
Teacher table name: String doj: date dob: date
Above given is the schema of the table teacher.
Difference between Schema and Instance :
Schema Instance

It is the collection of information stored in a database at a particular


moment.
It is the overall description of the database.
Schema is same for whole database. Data in instances can be changed using addition, deletion, updation.

Does not change Frequently. Changes Frequently.

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

Advantages Database Schema

• You can manage data independent of the physical storage


• Faster Migration to new graphical environments
• DBMS Architecture allows you to make changes on the presentation level without affecting the other two layers
• As each tier is separate, it is possible to use different sets of developers
• It is more secure as the client doesn’t have direct access to the database business logic
• In case of the failure of the one-tier no data loss as you are always secure by accessing the other tier

Disadvantages Database Schema

• Complete DB Schema is a complex structure which is difficult to understand for every one
• Difficult to set up and maintain
• The physical separation of the tiers can affect the performance of the Database
Mapping

In the above diagram:

o It shows the DBMS architecture. o Mapping is used to transform the request and response between various
database levels of architecture. o Mapping is not good for small DBMS because it takes more time. o In
External / Conceptual mapping, it is necessary to transform the request from external level to conceptual schema. o
In Conceptual / Internal mapping, DBMS transform the request from the conceptual to internal level.

There are two types of mapping


• External-Conceptual Mapping
• Conceptual-Internal Mapping

Data Independence o Data independence can be explained using the

three-schema architecture.
o 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

• 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. 2. 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.

Fig: Data Independence


Difference between Physical and Logical Data Independence :
Physical Data Independence Logical Data Independence

It mainly concern about how the data is stored into the system. It mainly concerned about the structure or the changing data definition.

It is difficult to retrieve because the data is mainly dependent on the logical


structure of data.
It is easy to retrieve.

As compared to the logical independence it is easy to achieve physical data As compared to the physical independence it is not easy to achieve logical
independence. data independence.

Any change at the physical level, does not require to change at the
application level.
The change in the logical level requires a change at the application level.

The modifications made at the internal level may or may not be needed to The modifications made at the logical level is significant whenever the logical
improve the performance of the structure. structure of the database is to be changed.

It is concerned with the internal schema. It is concerned with the conceptual schema.

Example: Change in compression techniques, Hashing algorithms and


storage devices etc.
Example: Add/Modify or Delete a new attribute.

Classification of Database Management System, Centralized and Client Server architecture to DBMS

Based on the data model


Relational database – This is the most popular data model used in industries. It is based on the SQL. They are table oriented which means data is stored in
different access control tables, each has the key field whose task is to identify each row. The tables or the files with the data are called as relations that help in
designating the row or record, and columns are referred to attributes or fields. Few examples are MYSQL(Oracle, open source), Oracle database (Oracle),
Microsoft SQL server(Microsoft) and DB2(IBM)
Object oriented database – The information here is in the form of the object as used in object oriented programming. It adds the database functionality to
object programming languages. It requires less code, use more natural data and also code bases are easy to maintain. Examples are ObjectDB (ObjectDB
software).

Object relational database – Relational DBMS are evolving continuously and they have been incorporating many concepts developed in object database
leading to a new class called extended relational database or object relational database.
Hierarchical database – In this, the information about the groups of parent or child relationships is present in the records which is similar to the structure of a
tree. Here the data follows a series of records, set of values attached to it. They are used in industry on mainframe platforms. Examples are IMS(IBM),
Windows registry(Microsoft).

Network database – Mainly used on a large digital computers. If there are more connections, then this database is efficient. They are similar to hierarchical
database, they look like a cobweb or interconnected network of records. Examples are CA-IDMS(COMPUTER associates), IMAGE(HP).

Based on the number of users


Single user – As the name itself indicates it can support only one user at a time. It is mostly used with the personal computer on which the data resides
accessible to a single person. The user may design, maintain and write the database programs.
Multiple users – It supports multiple users concurrently. Data can be both integrated and shared,a database should be integrated when the same information is
not need be recorded in two places. For example a student in the college should have the database containing his information. It must be accessible to all the
departments related to him. For example the library department and the fee section department should have information about student’s database. So in such
case, we can integrate and even though database resides in only one place both the departments will have the access to it.

Based on the sites over which network is distributed

Centralized database system – The DBMS and database are stored at the single site that is used by several other systems too. We can simply say that data here
is maintained on the centralized server.
Parallel network database system – This system has the advantage of improving processing input and output speeds. Majorly used in the applications that
have query to larger database. It holds the multiple central processing units and data storage disks in parallel.
Distributed database system – In this data and the DBMS software are distributed over several sites but connected to the single computer.

Further they are classified as


1.Homogeneous DBMS – They use same software but from the multiple sites. Data exchange between the sites can be handled easily. For example, library
information systems by the same vendor ,such as Geac Computer corporation, use the same DBMS software that allows the exchanges between various Geac
library sites.
2.heterogeneous DBMS – They use different DBMS software for different sites but there is a additional software that helps the exchange of the data
between the sites.
Client-server database system – This system has two logical components namely client and server. Clients are generally the personal computers or
workstations whereas servers are the large workstations, mini range computers or a main frame computer system. The applications and tools of the DBMS run
on the client platforms and the DBMS software on the server. Both server and client computers are connected over the network. We can relate it to client and
server in real life to understand in a much better way. Here the applications and tools act as a client send the requests for its services. The DBMS processes
these requests and returns the result to the client. Server handles jobs that are common to many clients say database access and updates.
Multi-tier client-server database system – The rise of personal computers in business has increased the reliability of the network hardware leading to
evolution of two-tier and three-tier systems which use different software for the client and software.

Based on the cost


• Low cost DBMS – The cost of these systems vary from $100 to $3000.
• Medium cost DBMS – Cost varies from $10000 to $100000.
• High cost DBMS – Cost pf these systems are usually more than $100000.
Based on the access
This classification simply based on the access to data in the database systems
• Sequential access – One after the other.
• Direct access • Inverted file structures

Based on the usage

• Online transaction processing(OLTP) DBMS – They manage the operational data. Database server must be able to process lots of simple transactions
per unit of time. Transactions are initiated in real time, in simultaneous by lots of user and applications hence it must have high volume of short, simple
queries.
• Online analytical processing(OLAP) DBMS – They use the operational data for tactical and strategical decision making. They have limited users deal
with huge amount of data,complex queries.
• Big data and analytics DBMS – To cope with big data new database technologies have been introduced. One such is NoSQL (not only SQL) which
abandons the well known relational database scheme.

Centralized Database System

The centralized database system consists of a single processor together with its associated data storage devices and other peripherals. It is physically confined
to a single location. Data can be accessed from the multiple sites with the use of a computer network while the database is maintained at the central site.
Disadvantages of Centralized Database System

• When the central site computer or database system goes down, then every one (users) is blocked from using the system until the system comes back.
• Communication costs from the terminals to the central site can be expensive.
Client-Server DBMS

Client/Server architecture of database system has two logical components namely client, and server. Clients are generally personal computers or workstations
whereas server is large workstations, mini range computer system or a mainframe computer system. The applications and tools of DBMS run on one or more
client platforms, while the DBMS soft wares reside on the server. The server computer is caned back end and the client’s computer is called front end. These
server and client computers are connected into a network. The applications and tools act as clients of the DBMS, making requests for its services. The DBMS,
in turn, processes these requests and returns the results to the client(s). Client/Server architecture handles the Graphical User Interface (GUI) and does
computations and other programming of interest to the end user. The server handles parts of the job that are common to many clients, for example, database
access and updates.
Multi-Tier client server computing models
In a single-tier system the database is centralized, which means the DBMS Software and the data reside in one location and the dumb terminals were used to
access the DBMS
Advantages of Client/Server Database System

• Client/Server system has less expensive platforms to support applications that had previously been running only on large and expensive mini or mainframe
computers
• Client offer icon-based menu-driven interface, which is superior to the traditional command-line, dumb terminal interface typical of mini and mainframe
computer systems.
• Client/Server environment facilitates in more productive work by the users and making better use of existing data.
• Client/Server database system is more flexible as compared to the Centralized system.
• Response time and throughput is high.
• The server (database) machine can be custom-built (tailored) to the DBMS function and thus can provide a better DBMS performance.
• The client (application database) might be a personnel workstation, tailored to the needs of the end users and thus able to provide better interfaces, high
availability, faster responses and overall improved ease of use to the user. + A single database (on server) can be shared across several distinct client
(application) systems.
Disadvantages of Client/Server Database System

• Programming cost is high in client/server environments, particularly in initial phases.


• There is a lack of management tools for diagnosis, performance monitoring and tuning and security control, for the DBMS, client and operating systems and
networking environments.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy