You are on page 1of 46

DATABASE MANAGEMENT

SYSTEMS
What is Data?

• Data is a collection of facts, such as numbers, words, measurements, observations


or just descriptions of things.
• Qualitative vs Quantitative
• Data can be qualitative or quantitative.
• Qualitative data is descriptive information (it describes something)
• Quantitative data is numerical information (numbers)
• Qualitative:
• He is brown and black
• He has long hair
• He has lots of energy
• Quantitative:
• Discrete:
• He has 4 legs
• He has 2 brothers
• Continuous:
• He weighs 25.5 kg
• He is 565 mm tall
What is a database?
• The database is an organized collection of related data that is stored efficiently and
compactly.
• A database is a systematic collection of data. They support electronic storage and
manipulation of data. Databases make data management easy.

• A database example: An online telephone directory uses a database to store data of


people, phone numbers, and other contact details. Your electricity service provider uses
a database to manage billing, client-related issues, handle fault data, etc.

• Consider Facebook. It needs to store, manipulate, and present data related to members,
their friends, member activities, messages, advertisements, and a lot more.
DATABASE
WHAT IS DBMS?
• A Database Management System (DBMS) is a software system that is
designed to manage and organize data in a structured manner.
• The purpose of DBMS is to transform the following :
• Data into information.
• Information into knowledge.
• Knowledge to the action.
Applications of DBMS
• The different applications of DBMS are as follows −
• Railway Reservation System − It is used to keep record of booking of tickets, departure of the
train and the status of arrival and give updates to the passengers with the help of a database.
• Library Management System − There will be so many numbers of books in the library and it is
very hard to keep a record of all the books in a register or a copy. So, DBMS is necessary to keep
track of all the book records, issue dates, name of the books, author and maintain the records.
• Banking − We are doing a lot of transactions daily without directly going to the banks. The only
reason is the usage of databases, and it manages all the data of the customers over the database.
• Educational Institutions − All the examinations and the data related to the students maintained
over the internet with the help of a database management system. It contains registration details
of the student, results, grades and courses available. All these works can be done online without
visiting an institution.
• Social Media Websites − By filling the required details we are able to access social media
platforms. Many users daily sign up for social websites such as Facebook, Pinterest and
Instagram. All the information related to the users are stored and maintained with the help of
DBMS.
EVOLUTION OF DATABASES
• The main objective of the database is to ensure that data can be stored and
retrieved easily and effectively.
• It is a compilation of data (records) in a structured way.
• In a database, the information is stored in a tabular form where data may or may
not interlinked
• Hence, we can say that basically database is a compilation of database files, and
each database file is further a collection of records.
Evolution of dbms
• The chronological order of the development of DBMS is as follows
• 1. Flat Files (1970s-1990s)
• 2. Hierarchical (1970s-1990s)
• 3. Network (1970s- 1990s)
• 4. Relational (1980s-present)
• 5. Object-Oriented (1990s- present)
• 6. Object-Relational (1990s-present)
• 7. Web enabled (1990s-present)
Evolution of dbms
1.Flat Files (1970s-1990s) : Flat files database is a database that stores
information in a single file or table.
• In text file, every line contains one record where fields either have fixed
length or they are separated by commas, whitespaces, tabs or any records
and they cannot contain multiple tables as well.
• There are two serious problems that have been caused by trying to store this data in a flat file
database :
• Redundant Data : Some data is stored more than once. This means that storage space is wasted and
inconsistency can occur.
• Data Inconsistency : Because some items of data are stored more than once, it is possible that in error
two different values for the same item could be stored.
2.Hierarchical (1970s-1990s) : As the name indicates, hierarchical
database contains data in a hierarchically-arranged data.
• More Perceptively it can parent can have many children but one child
can only have one parent i. e.,; one-to-many relationship.
• Its hierarchical structure contains levels or segments which are
equivalent to the file system’s record type.
• All attributes of a specific record are listed under the entity type.
• Network database (1970s -1990s) : The inventor of network model is Charles Bachmann.
• Unlike hierarchical database model, network database allows multiple parent and child
relationships i. e., it maintains many-to many relationship.
• Network database is basically a graph structure. The network database model was created to
achieve three main objectives:
• To represent complex data relationship more effectively.
• To improve the performance of the database.
• To improve a database standard.
• Relationl database (1980s-1990s) : Relationship database model was proposed
by E. F. Codd.
• After the hierarchical and network model the birth of this model was huge step
ahead.
• It allows the entities to be related through a common attribute.
• In the table there are alternative keys.
• This property makes this model extremely flexible.
• Object – oriented database (1990s -present) : Object-Oriented database
management system is that database system in which the data or information is
presented in the form of objects, much like in object-Oriented programming
language.
• Furthermore, object-oriented DBMS also facilitate the user by offering
transportation support, language for various queries, and indexing options.
• Also, these database systems have the ability to handle data efficiently over
multiple servers. Unlike relationship database object-oriented database works in
the framework of real programming language like JAVA or C++.
• Object- relationship database (1990s-present) : Defined in simple teams, an
object relationship database management system displays a modified object-
oriented user- display over the already implemented relationship database
management system.
• When various software interact with this modified- database management system,
they will customarily operate in a manner such that data is assumed to be saved as
objects.
• The basic working of this database management system is that is translated the
useful data into organized tables distributed in rows and columns, and from then
onwards, it manages data the same way done in relational database system.
• Similarly, when the data is to be accessed by the user, it is again translated from
processed to complex form.
Web Enabled Database
• A web database is essentially a database that can be accessed from a local network or the internet
instead of one that has its data stored on a desktop or its attached storage.
• Used for both professional and personal use, they are hosted on websites and are software as
service (SaaS) products, which means that access is provided via a web browser.
• Eg : To paint a picture, just think about when you online shop and want to have a look at a specific
product.
• Typing in keywords such as “black dress” enables all the black dresses stored on the website to
appear right on the very browser you are looking on because the information “black” and “dress”
are stored in their database entries.
Goal of Database Systems
• Database management systems were developed to handle the
following difficulties of typical file-processing systems
supported by conventional operating systems.
• Data redundancy and inconsistency
• Difficulty in accessing data
• Data isolation – multiple files and formats
• Integrity problems
• Atomicity of updates
• Concurrent access by multiple users
• Security problems
ADVANTAGES OF DBMS
• CENTRALISED CONTROL
• INTEGRATED AND SHARED
• REDUNDANCY CAN BE REDUCED
• INCONSISTENCY CAN BE AVOIDED
• STANDARDS CAN BE ENFORCED
• SECURITY RESTRICTIONS
• DATA INDEPENDENCE
• INTEGRITY CAN BE MAINTAINED
Types of Databases and Database Applications
 Traditional Applications:
 Numeric and Textual Databases

 More Recent Applications:


 Multimedia Databases

 Geographic Information Systems (GIS)

 Data Warehouses

 Real-time and Active Databases

 Many other applications


Basic Definitions
• Data:
• Known facts that can be recorded and have an implicit meaning.
• Database:
• A collection of related data.
• Mini-world/Database System:
• Some part of the real world about which data is stored in a database. For example, student
grades and transcripts at a university.
• The DBMS software together with the data itself. Sometimes, the applications are also
included.
• Database Management System (DBMS):
• A software package/ system to facilitate the creation and maintenance of a computerized
database.
Simplified database system environment
Typical DBMS Functionality
• Define a particular database in terms of its data types, structures, and
constraints
• Construct or Load the initial database contents on a secondary storage
medium
• Manipulating the database:
• Retrieval: Querying, generating reports
• Modification: Insertions, deletions and updates to its content
• Accessing the database through Web applications
• Processing and Sharing by a set of concurrent users and application
programs – yet, keeping all data valid and consistent.
Typical DBMS Functionality
• Other features:
• Protection or Security measures to prevent unauthorized
access.
• “Active” processing to take internal actions on data
• Presentation and Visualization of data
• Maintaining the database and associated programs over the
lifetime of the database application
• Called database, software, and system maintenance
Example of a Database
(with a Conceptual Data Model)
• Mini-world for the example:
• Part of a UNIVERSITY environment.
• Some mini-world entities:
• STUDENTs
• COURSEs
• SECTIONs (of COURSEs)
• (academic) DEPARTMENTs
• INSTRUCTORs
Example of a Database
(with a Conceptual Data Model)
• Some mini-world relationships:
• SECTIONs are of specific COURSEs
• STUDENTs take SECTIONs
• COURSEs have prerequisite COURSEs
• INSTRUCTORs teach SECTIONs
• COURSEs are offered by DEPARTMENTs
• STUDENTs major in DEPARTMENTs
Example of a simple database

Slide 1- 27
Main Characteristics of the Database
Approach
• Self-describing nature of a database system:
• A DBMS catalog stores the description of a particular database (e.g., data structures,
types, and constraints)
• The description is called meta-data.
• This allows the DBMS software to work with different database applications.
• Insulation between programs and data:
• Called program-data independence.
• Allows changing data structures and storage organization without having to change
the DBMS access programs.

Slide 1- 28
Example of a simplified database catalog

Slide 1- 29
Main Characteristics of the Database Approach
(continued)
• Data Abstraction:
• A data model is used to hide storage details and present the users with a
conceptual view of the database.
• Programs refer to the data model constructs rather than data storage details
• Support of multiple views of the data:
• Each user may see a different view of the database, which describes only the
data of interest to that user.
• Avoiding redundancy of data:

Slide 1- 30
Main Characteristics of the Database Approach
(continued)
• Sharing of data and multi-user transaction processing:
• Allowing a set of concurrent users to retrieve from and to update the database.
• Concurrency control within the DBMS guarantees that each transaction is correctly
executed or aborted
• Recovery subsystem ensures each completed transaction has its effect permanently
recorded in the database
• OLTP (Online Transaction Processing) is a major part of database applications. This
allows hundreds of concurrent transactions to execute per second.

Slide 1- 32
Database Users
• Users may be divided into
• Those who actually use and control the database content, and those who
design, develop and maintain database applications (called “Actors on the
Scene”), and
• Those who design and develop the DBMS software and related tools, and the
computer systems operators (called “Workers Behind the Scene”).

Slide 1- 33
Database Users
• Actors on the scene
• Database administrators:
• Responsible for authorizing access to the database, for coordinating and monitoring its
use, acquiring software and hardware resources, controlling its use and monitoring
efficiency of operations.
• Database Designers:
• Responsible to define the content, the structure, the constraints, and functions or
transactions against the database. They must communicate with the end-users and
understand their needs.

Slide 1- 34
Categories of End-users
• Actors on the scene (continued)
• End-users: They use the data for queries, reports and some of them update the
database content. End-users can be categorized into:
• Casual: access database occasionally when needed
• Naïve or Parametric: they make up a large section of the end-user
population.
• They use previously well-defined functions in the form of “canned transactions”
against the database.
• Examples are bank-tellers or reservation clerks who do this activity for an entire shift
of operations.

Slide 1- 35
Categories of End-users (continued)
• Sophisticated:
• These include business analysts, scientists, engineers, others
thoroughly familiar with the system capabilities.
• Many use tools in the form of software packages that work closely
with the stored database.
• Stand-alone:
• Mostly maintain personal databases using ready-to-use packaged
applications.
• An example is a tax program user that creates its own internal
database.
• Another example is a user that maintains an address book

Slide 1- 36
Database Users (continued)
• Actors behind the scene
• These persons are typically not interested in the database content itself. We call them the workers
behind the scene, and they include the following categories:
• DBMS system designers and implementers design and implement the DBMS modules and
interfaces as a software package.
• The DBMS must interface with other system software, such as the operating system and compilers
for various programming languages.
• Tool developers design and implement tools—the software packages that facilitate database
modeling and design, database system design, and improved performance. Tools are optional
packages that are often purchased separately.
• Operators and maintenance personnel (system administration personnel) are responsible for the
actual running and maintenance of the hardware and software environment for the database system
• These categories of workers behind the scene are instrumental in making the database system
available to end users, they typically do not use the database contents for their own purposes.
Advantages of Using the Database Approach
• Controlling redundancy in data storage and in development and
maintenance efforts.
• Sharing of data among multiple users.
• Restricting unauthorized access to data.
• Providing persistent storage for program Objects
• In Object-oriented DBMSs
• Providing Storage Structures (e.g., indexes) for efficient Query Processing

Slide 1- 38
Advantages of Using the Database Approach
(continued)
• Providing backup and recovery services.
• Providing multiple interfaces to different classes of users.
• Representing complex relationships among data.
• Enforcing integrity constraints on the database.
• Drawing inferences and actions from the stored data using
deductive and active rules

Slide 1- 39
Additional Implications of Using the Database
Approach
• Potential for enforcing standards:
• This is very crucial for the success of database applications in large
organizations.
• Standards refer to data item names, display formats, screens,
report structures, meta-data (description of data), Web page
layouts, etc.
• Reduced application development time:
• Incremental time to add each new application is reduced.

Slide 1- 40
Additional Implications of Using the Database
Approach (continued)
• Flexibility to change data structures:
• Database structure may evolve as new requirements are defined.
• Availability of current information:
• Extremely important for on-line transaction systems such as airline,
hotel, car reservations.
• Economies of scale:
• Wasteful overlap of resources and personnel can be avoided by
consolidating data and applications across departments.

Slide 1- 41
When not to use a DBMS
• Main inhibitors (costs) of using a DBMS:
• High initial investment and possible need for additional hardware.
• Overhead for providing generality, security, concurrency control, recovery,
and integrity functions.
• When a DBMS may be unnecessary:
• If the database and applications are simple, well defined, and not expected to
change.
• If there are stringent real-time requirements that may not be met because of
DBMS overhead.
• If access to data by multiple users is not required.

Slide 1- 42
When not to use a DBMS
• When no DBMS may suffice:
• If the database system is not able to handle the complexity of data
because of modeling limitations
• If the database users need special operations not supported by the
DBMS.

Slide 1- 43
SQL – STRUCTURED QUERY LANGUAGE
• SQL stands for Structured Query Language
• SQL lets you access and manipulate databases
• SQL became a standard of the American National Standards Institute (ANSI) in 1986,
and of the International Organization for Standardization (ISO) in 1987.
• SQL can execute queries against a database
• SQL can retrieve data from a database
• SQL can insert records in a database
• SQL can update records in a database
• SQL can delete records from a database
• SQL can create new databases
• SQL can create new tables in a database
• SQL can create stored procedures in a database
• SQL can create views in a database
• SQL can set permissions on tables, procedures, and views
Advantages of SQL
• SQL is the most common language used almost in every application software
including banking, finance, education, security etc. to store and manipulate data.
• Faster and Efficient Query Processing.
• SQL works with an efficient speed.
• No Need for Coding Skills.
• There is no need for large and complex code lines for data extraction.
• Portable.
• Standardized Language.
• Interactive Language.
• Multiple Data Views.
• Internet Usage.
• Large User Community.
PL/SQL
• PL/SQL is a procedural language designed specifically to embrace
SQL statements within its syntax.
• PL/SQL program units are compiled by the Oracle Database server
and stored inside the database.
• And at run-time, both PL/SQL and SQL run within the same server
process, bringing optimal efficiency.
• PL/SQL automatically inherits the robustness, security, and portability
of the Oracle Database.

You might also like