DATABASE
BY: SHWETANSHU GUPTA
MBA-TBS-49
CONTENTS
• INTRODUCTION
• DATABASE CONCEPTS
• DATA HIERARCHY
• ENTITIES AND ATTRIBUTES

• TYPES OF ATTRIBUTES
• DATABASE COMPONENTS
• DATABASE ARCHITECTURE

• DATABASE MODELS
• PLAYING WITH DATABASE
• ADVANTAGES OF DATABASE
File based system:
Limitations:
Program-Data Dependence.
 No centralized control of data.
Multiple file formats, duplication of information in different
files.
Each app. has its own private files & users has little chance
to share data outside their own app.
Each different data access request (a query) performed by a
separate program.
Cont’d
Creating the system requires a lot of effort

For each new application, programmers have to design
their own file formats & descriptions from scratch.
Excessive Program Maintenance: 80% of information
systems budget.
Need to write a new program to carry out each new task.

Data Redundancy (Duplication of data).
INTRODUCTION
 A database is an organised collection of related data
:
•

ƒ Representing/capturing the information about
a real-world , enterprise or part of an enterprise.

• ƒ Collected and maintained to serve specific data
management needs of the enterprise.
• It can be of varying size and complexity .
By data, we mean known facts that can be recorded.
Cont’d
For example: University Database
• Data about students, faculty, courses,
research laboratories, course registration/
enrolment etc.
• Purpose: To keep an accurate track of the
academic activities of the university.
Morphbank
It is a database of images that
scientists use for international
collaboration, research and
education.
Mind
Manager: is a
comprehensive
organizer for PC
users who want
to keep track of
just about
anything in their
daily lives.
Advantages of database over file system
Efficiency: highly efficient as data is stored in one central location.
Minimal Data Redundancy: reduce file duplication.
Data Consistency: less redundancy leads to consistency.
Data Integration: Since related data is stored in one single database, enforcing
data integrity is much easier..

Data Sharing: Related data can be shared across programs since the data is
stored in a centralized manner.
Cont’d
Better Controls: Better controls can be achieved due to the
centralized nature of the system
Application Development Ease: no need to write different programmes for
different applications.

Reduced Maintenance: Maintenance is less and easy, again, due to the
centralized nature of the system.
Providing backup and recovery services.
Database vs. File Systems
DATA HIERARCHY
BITS

0’s and 1’s

CHARACTER

Combination of 0’s and 1’s
011000111(A-Z)(0-9)(!-*)

FIELD

Combination of characters. Name, roll
no, class, rank

RECORD

Record of MBA 1st sem.

FILE

Record of each student of MBA 1st
sem.

DATABASE

Record of MBA 1st and 4th sem.
DATABASE CONCEPTS
 Database management system (dbms):Software to manipulate database.

 Metadata : Data that describe the properties or characteristics of end-user
data .

 Database administrator : Persons who are responsible for the overall
management of data resources

 Database system: Comprised of database, DBMS, and application programs
Cont’d
System developers: Programmers who design new application
programs.
End users : Who request or receive information from it.
Computer-aided software engineering (case) tools: CASE tools are
automated tools used to design databases and application programs.
Database management system (DBMS)
• A database management system (DBMS) is a general purpose
software system that:
• Defines, creates, and maintains a database.
• Allow access to data in database.
3- LEVEL DATABASE SYSTEM ARCHITECTURE
Levels of database
 The Internal level : It is the physical level which shows how the data is stored,
how bytes are transferred to and from storage devices. It interacts directly with
hardware.

 The Conceptual level: It is the representation of the entire information content
of the database. Main functions of DBMS are also defined on this level.

 The External Level : Represents the collection of views available to different
end-users. It changes data coming from conceptual level to a format and view that
is familiar to users.
ENTITIES AND ATTRIBUTES
TYPES OF ATTRIBUTES
ATOMIC
COMPOSITE
SINGLE-VALUED
MULTI-VALUED

• DOESN’T CONTAIN MEANINGFUL SMALLER
COMPONENTS- GENDER
• IF IT CONTAINS ONE OR MORE COMPONENTSADDRESS- HOUSE NO. STREET NO. PIN CODE
• HAVING SINGLE VALUE
• AGE, NAME
• MORE THAN ONE VALUE
• PHONE NUMBER, ID’s

DERIVED

• THAT CAN BE DERIVED FROM OTHER
• AGE

STORED

• THAT CAN BE FOUND WITH HELP OF OTHER
ATTRIBUTES - DATE OF BIRTH

NULL-VALUED

• THAT HAVE VALUE ONLY FOR PARTICULAR
ATTRIBUTE- DEGREE
Types of database models

Hierarchical model
Network model
Relational model
Hierarchical database model

Logically represented by an upside down tree
Each entity have one parent but can have several parents.
At top of hierarchy there is only one entity called root.
Network data model
Each record can have multiple parents.
Each entity can be accessed through several paths.
Relational database model
RDBMS: the relational database management system
(RDBMS)
Relation: a relation is a 2D table has the following
features:

Attributes
Entity
Tuples
Relational database model
All data is maintained in the form of tables consisting of
rows and columns.
Operators are provided.
This, in fact, is a major reason for the relational model to
become more programmer friendly and much more
dominant and popular.
Oracle, Sybase, DB2, Ingres, Informix, MS-SQL Server are
few of the popular Relational DBMSs.
Relation

A table

Tuple

A row or a record in a relation.

Attribute

A field or a column in a relation.

Cardinality of a relation

The number of tuples in a relation.

Degree of a relation

The number of attributes in a relation.

Foreign Key

An attribute or a combination of attributes in one
relation R1 connecting it to R2

Primary Key
of a relation

An attribute or a combination of attributes that
uniquely defines each tuple in a relation.
Degree
Attributes
Agent
code

Primary key

Agent
name

Agent
area code

Agent
phone

501

Alex

713

56789

502

John

615

67542

Agent
code
501

Foreign key

Customer
code
601

Customer
name
Bob

product

502

602

Alice

Detergent

Soap

T
U
P
L
E

C
A
D
I
N
A
L
I
T
Y
Advantages
Conceptual simplicity
Handles more relationship types
Data access flexibility
Promotes database integrity
Data independence
Conformance to standards
Disadvantages
System complexity
Lack of structural independence
PLAYING WITH DATABASE
DATA DEFINITION LANGUAGE (DDL)
Collection of instructions and commands used to define and describe data and data
relationships.

DATA DICTIONARY
Detailed description of all data used in the database.
Provide a standard definition of terms and data elements

DATA MANIPULATION LANGUAGE (DML)
Allows users to access, modify, and make queries about data contained in the database
Generate reports

REPORT:
A view of just a portion of a database records and/or fields as desired by user.
database
database