0% found this document useful (0 votes)
2 views

1.Introduction to Database Concepts

The document provides an overview of Database Management Systems (DBMS), highlighting their applications across various sectors such as banking, airlines, and manufacturing. It discusses the purpose of database systems, the levels of abstraction, data models, and the roles of different database users and administrators. Additionally, it covers the Entity-Relationship model, including concepts such as entities, relationships, attributes, and keys.

Uploaded by

ramkumardeven1
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

1.Introduction to Database Concepts

The document provides an overview of Database Management Systems (DBMS), highlighting their applications across various sectors such as banking, airlines, and manufacturing. It discusses the purpose of database systems, the levels of abstraction, data models, and the roles of different database users and administrators. Additionally, it covers the Entity-Relationship model, including concepts such as entities, relationships, attributes, and keys.

Uploaded by

ramkumardeven1
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 27

DATABASE

TECHNOLOGIES
Database Management System (DBMS)
• Collection of interrelated data with Set of programs
to access those data
• Database Applications:
– Banking: all transactions
– Airlines: reservations, schedules
– Universities: registration, grades
– Sales: customers, products, purchases
– Manufacturing: production, inventory, orders, supply
chain
– Human resources: employee records, salaries, tax
deductions
• Databases touch all aspects of our lives
Purpose of Database System
• In the early days, database applications were built
on top of file systems
• Drawbacks of using file systems to store data:
– Data redundancy and inconsistency
• Multiple file formats, duplication of information in different files
– Difficulty in accessing data
• Need to write a new program to carry out each new task
– Data isolation — multiple files and formats
– Integrity problems
• Integrity constraints (e.g. account balance > 0) become part
of program code
• Hard to add new constraints or change existing ones
– Atomicity of updates
• Failures may leave database in an inconsistent state with partial
updates carried out
• E.g. transfer of funds from one account to another should either
complete or not happen at all
– Concurrent access by multiple users
• Concurrent accessed needed for performance
• Uncontrolled concurrent accesses can lead to inconsistencies
– E.g. two people reading a balance and updating it at the same time
– Security problems

• Database systems offer solutions to all the above


problems
Levels of Abstraction
• Physical level describes how a record (e.g., customer) is
stored.
• Logical level: describes data stored in database, and the
relationships among the data.
type customer = record
name : string;
street : string;
city : integer;
end;
• View level: application programs hide details of data types.
Views can also hide information (e.g., salary) for security
purposes.
An architecture for a database system
Instances and Schemas
• Similar to types and variables in programming
languages

• Schema – the logical structure of the database


– e.g., the database consists of information about a set of
customers and accounts and the relationship between them)
– Analogous to type information of a variable in a program
– Physical schema: database design at the physical level
– Logical schema: database design at the logical level

• Instance – the actual content of the database at a


particular point in time
Data Models
• A collection of tools for describing
– data
– data relationships
– data semantics
– data constraints
• Entity-Relationship model
• Relational model
• Other models:
– object-oriented model
– semi-structured data models
– Older models: network model and hierarchical model
Database Users
• Users are differentiated by the way they expect to interact
with the system
• Application programmers – interact with system through
DML calls
• Sophisticated users – form requests in a database query
language
• Specialized users – write specialized database applications
that do not fit into the traditional data processing framework
• Naïve users – invoke one of the permanent application
programs that have been written previously
– E.g. people accessing database over the web, bank tellers, clerical
staff
Database Administrator
• Coordinates all the activities of the database
system; the database administrator has a good
understanding of the enterprise’s information
resources and needs.
• Database administrator's duties include:
– Schema definition
– Storage structure and access method definition
– Schema and physical organization modification
– Granting user authority to access the database
– Specifying integrity constraints
– Acting as liaison with users
– Monitoring performance and responding to changes in
requirements
Application Architectures

Two-tier architecture: E.g. client programs using


ODBC/JDBC to communicate with a database
Three-tier architecture: E.g. web-based applications,
and applications built using “middleware”
Entity-Relationship Model
Introduction
• A database can be modeled as:
– a collection of entities,
– relationship among entities.
• An entity is an object that exists and is distinguishable
from other objects.
– Example: specific person, company, event, plant
• Entities have attributes
– Example: people have names and addresses
• An entity set is a set of entities of the same type that
share the same properties.
– Example: set of all persons, companies, trees, holidays
• A relationship is an association among
several entities
• An relationship set is a set of relationship
of the same type that share the same
properties
• An entity is represented by a set of
attributes, that is descriptive properties
possessed by all members of an entity set.
• Attribute types:
– Simple and composite attributes.
– Single-valued and multi-valued attributes
• Example: multivalued attribute: phone_numbers
– Derived attributes
• Can be computed from other attributes
• Example: age, given date_of_birth
Mapping Cardinality Constraints
• Express the number of entities to which another
entity can be associated via a relationship set.
• Most useful in describing binary relationship
sets.
• For a binary relationship set the mapping
cardinality must be one of the following types:
– One to one
– One to many
– Many to one
– Many to many
One to one One to many
Many to one Many to many
Keys
• A super key of an entity set is a set of one
or more attributes whose values uniquely
determine each entity.
• A candidate key of an entity set is a
minimal super key
– Customer_id is candidate key of customer
– account_number is candidate key of account
• Although several candidate keys may
exist, one of the candidate keys is selected
to be the primary key.
E-R Diagram
• Rectangles represent entity sets.
• Diamonds represent relationship sets.
• Lines link attributes to entity sets and
entity sets to relationship sets.
• Ellipses represent attributes
– Double ellipses represent multivalued
attributes.
– Dashed ellipses denote derived attributes.
• Underline indicates primary key attributes
Example
E-R Diagram With Composite,
Multivalued, and Derived Attributes
Relationship Sets with Attributes
One-To-Many Relationship
Many-To-One Relationships
Many-To-Many Relationship
Specialization & Generalization

You might also like