You are on page 1of 23

Database Management System

Mr.V.Yuvaraj
Assistant Professor – Department of Computer Applications
Dr. N.G.P. ARTS AND SCIENCE COLLEGE
Dr. N.G.P.-KALAPATTI ROAD
COIMBATORE-641 048
Tamil Nadu, India
Mobile: +917502919891,
E-mail: yuvaraj.v@drngpasc.ac.in

Dr. NGPASC
COIMBATORE | INDIA
What Is a Database?

Database –A collection of related data stored in a manner that enables


information to be retrieved as needed
Database Management System (DBMS) –
• Used to create, maintain, and access databases – Database
engine.
• The part of the program that actually stores and retrieves
data Microsoft Access, OpenOffice Base, Corel Paradox, Oracle
Database, etc.

Dr. NGPASC
COIMBATORE | INDIA
2
What Is a Database?

A database typically consists of: –


Tables
• Collection of related records
Fields (columns)
• Single category of data to be stored in a database (name,
telephone number, etc.)
Records (rows)
• Collection of related fields in a database (all the fields for one
customer, for example)
Dr. NGPASC
COIMBATORE | INDIA
3
What Is a Database?

Dr. NGPASC
COIMBATORE | INDIA
What Is a Database?

– Primary Key
• Field that uniquely identifies the records in a table
• Field in a table that is used to relate that table to other tables

Dr. NGPASC
COIMBATORE | INDIA
5
The Evolution of Databases

Dr. NGPASC
COIMBATORE | INDIA
6
What Is a Database?
Advantages and Disadvantages of the DBMS Approach
– Advantages
– Low level of redundancy
– Faster response time
– Lower storage requirements
– Easier to secure
– Increased data accuracy
– Disadvantages
Increased vulnerability (backup is essential)

Dr. NGPASC
COIMBATORE | INDIA
7
Data Concepts and Characteristics

Data Hierarchy
– Fields/columns
• Hold single pieces of data
– Records/rows
• Groups of related fields
– Tables
• Collection of related records
– Database
• Contains a group of related tables

Dr. NGPASC
COIMBATORE | INDIA
Data Concepts and Characteristics

Entities and Entity Relationships


– Entity
• A person, object, or event of importance to the
organization
• Entities that the organization wants to store data about
typically becomes a database table
– Attributes
• Characteristics of an entity
• Typically become fields in the entity’s database table
– Relationship
• An association between two or more entities
Dr. NGPASC
COIMBATORE | INDIA
Data Concepts and Characteristics

One to One (1:1) Entity Relationships


• One entity is related to only one other entity of a particular
type
• Not a common type of relationship
– One to Many (O:M) Entity Relationship
• Most common type of relationship
• One entity can be related to more than one other entity
– A supplier can supply more than one product to a
company
– Many to Many (M:M) Entity Relationships
• One entity can be related to more than one other entity, and
those entities can be related to multiple entities of the same
type as the original entity
Dr. NGPASC
COIMBATORE | INDIA
Dr. NGPASC
COIMBATORE | INDIA
Multiplicity of Relationships

Many-to-many Many-to-one One-to-one

multiplicity of relationship in ER diagram represented by an arrow pointing to “one”

Dr. NGPASC
COIMBATORE | INDIA
Many to Many Relationship

customer custacct account

opening date

Customer Account Start Date Customer Account Start Date


John 1001 Jan 20th 1999 John 1001 Jan 20th 1999
Megan 1001 March 16th 1999 Megan 1001 March 16th 1999
Megan 2001 Feb 18th 1994
legal legal

• Multiple customers can share an account


•Dr. NGPASC
Many accounts may have one owner
COIMBATORE | INDIA
Many to One Relationship

customer custacct account

opening date

Customer Account Start Date Customer Account Start Date


John 1001 Jan 20th 1999 John 1001 Jan 20th 1999
Megan 1001 March 16th 1999 Megan 1001 March 16th 1999
Megan 2001 Feb 18th 1994

Illegal legal

• Multiple customers can share an account but one


customer can have only one account.
Dr. NGPASC
COIMBATORE | INDIA
Relationship Attribute in a Many to One Relationship

customer custacct account

opening date

• In a Many-One relationship, relationship attributes can be


repositioned to the entity set on the many side.

customer custacct account

opening date
Dr. NGPASC
COIMBATORE | INDIA
One to One Relationship
customer custacct account

opening date
Illegal
Customer Account Start Date
• 1 customer can have 1 John 1001 Jan 20th 1999
account. Megan 1001 March 16th 1999

• One account can be owned by Illegal


1 customer Customer Account Start Date
Megan 1001 March 16th 1999
• relationship attributes can be Megan 2001 Feb 18th 1994
shifted to either of the entity Legal
sets Customer Account Start Date
Megan 1001 March 16th 1999
Dr. NGPASC
COIMBATORE | INDIA John 2001 Feb 18th 1994
Database Design Process
miniworld
Requirement Analysis

functional requirements Data requirements

functional analysis conceptual design

conceptual schema
logical design
application design
logical schema
high level specs (in DBMS model)
physical design
transaction implementation

application programs Physical schema

Dr. NGPASC
Functional Design Database Design
COIMBATORE | INDIA
Database Design Tools
• Help partially automate the design cycle.
• Graphical interface to specify conceptual schemas.
• Partially automated techniques to map to logical (DBMS
dependent) model.
• Features of a good design tool:
– Iterative: errors /shortcomings of original design found later can be corrected
without full restart.
– Interactive: any design choices made by system during design should be
based on interaction with designer.
– Feedback: a designer’s change made at logical and/or physical levels should
be automatically translated to changes at higher levels.

Dr. NGPASC
COIMBATORE | INDIA
Database System Development Lifecycle

• Application design
• Prototyping (optional)
• Implementation
• Data conversion and loading
• Testing
• Operational maintenance

Dr. NGPASC
COIMBATORE | INDIA Pearson Education © 2009 19
Stages of the Database System
Development Lifecycle

Dr. NGPASC
COIMBATORE | INDIA Pearson Education © 2009 20
Confident. / Integrity / Availability
Courtesy of: Prof. Barbara Endicott-Popovsky

• Requirements can be rephrased / sumarized as follows:


– Data must be trusted
• DBMS designed to manage trust
• DBMS must reconstruct reality
– Data must be accurate
• Field checks
• Access control (CRUD)
– CRUD = Create, Read, Update, and Delete
• Change log
– Trade-offs
• Audit vs. performance
• Access vs. performance
– Self-authentication
– High availability

Dr. NGPASC
COIMBATORE | INDIA
Security
• Security requirements for databases and DBMSs:
a. Physical database integrity requirements
 DB immune to physical problems (e.g., power failure, flood)
b. Logical database integrity requirements
 DB structure preserved (e.g., update of a field doen’t affect another)
c. Element integrity requirements
 Accuracy of values of elements
d. Auditability requirements
 Able to track who accessed (read, wrote) what
e. Access control requirements
 Restricts DB access (read, write) to legitinmate users
f. User authentication requirements
 Only authorized users can access DB
g. Availability requirements
 DB info available to all authorized users 24/7
Dr. NGPASC
COIMBATORE | INDIA
Dr. NGPASC
COIMBATORE | INDIA 23

You might also like