BRT Chapter 1
BRT Chapter 1
By: Birtukan A.
To: Computer science(2nd)
Methodology
◦ lectures (questions and active participations from students )
◦ Assignments
◦ lab
Assessment Method:
◦ 50% ( Lab, test, project work)
◦ 50% Final Exam
Text Book
◦ Elmasri, et al (2011). Fundamentals of Database Systems, 6th ed, Pearson
education
1
Course Guide book
Title:Introduction to database system
objectives
At the end of this course, students will be able to:
◦ Understand the basic principles of database design
systems using different database models
◦ Differentiate database from file system
◦ Design different types of databases
◦ Create database tables, views, and indices
◦ Write SQL queries and database programs
2
Course Guide book
Chapter one: Introduction to database system
◦ Introduction
◦ Data management approaches
◦ Components of DBMS
◦ Functions of DBMS
◦ Database management lifecycle
◦ Roles in DB design environment
◦ The ANSI-SPARC architecture
◦ Database languages
◦ Data models
3
Chapter two
Chapter two: Relational data model
◦ Relational Constraints
◦ Relational Integrity
◦ Key constraints
◦ Referential constraints
4
Chapter three
Chapter three: Conceptual database
design(ER-model)
◦ Cardinality constraints
◦ Participation constraints
◦ Problem with E-R models
◦ Enhanced E-R models
5
Chapter four
Chapter four: logical database design
(normalizations)
◦ Normalization
◦ Functional dependencies
◦ Process of normalization (1NF, 2NF, 3NF)
6
Chapter five
7
Chapter six
8
Chapter one
Introduction
Fundamentals of database system
9
Content
Introduction
Data management approaches
Components of DBMS
Functions of DBMS
Database management lifecycle
Roles in DB design environment
The ANSI-SPARC architecture
Database languages
Data models
10
Basic terms with simple meaning
Data: facts that are going to be stored
Information: processed data
Database: collection of related data
managed by DBMS
DBMS: S/W used to mange database
◦ management: definition and manipulation
DBS: DBMS+Database
11
What is a database?
Database systems are designed to manage
large data set in an organization.
The data management involves both
definition and the manipulation of the
data.
A database is a collection of shared
information that exists over a long period
of time, often many years.
12
Count..
Today, Databases are essential to every
business. used to
◦ Maintain internal records,
◦ To present data to customers and clients on the
World-Wide-Web, and
◦ To support many other commercial processes.
Databasesare found at the core of many
modern organizations.
The power of databases comes from DBMS
A DBMS is a powerful tool for creating and
managing large amounts of data
13
Count..
DB course is about:
◦ How to organize data
◦ Supporting multiple users
◦ Efficient and effective data retrieval
◦ Secured and reliable storage of data
◦ Maintaining consistent data
◦ Making information useful for decision
making
14
Cont…
Data management development levels
◦ along with technology and services.
The major three levels are;
1. Manual Approach
2. Traditional File Based Approach
3. Database Approach
15
1. Manual Approach
data storage and retrieval follows the
primitive and traditional way of data handling
cards and paper are used for the purpose.
Files used as to store organizations data
files stored in cabinets(shelves )
Insertion and retrieval is done by searching
first for the right cabinet then for the right file
then the information.
One could have an indexing system to
facilitate access to the data
16
Limitations of the Manual approach
Prone to error
Difficult to update, retrieve
Limited to You have the data but it is
difficult to compile the information
Limited for mall size information
Cross referencing is difficult
17
2. Traditional File Based Approach
An early attempt to computerize the manual
filing system.
Computerized but decentralized data handling
method.
A collection of application programs perform
services for the end-users.
◦ In such systems, every application program that
provides service to end users define and manage its
own data
Since every application defines and manages its
own data, the system is subjected to serious
data duplication . 18
Limitations of the Traditional File Based
approach
Separation or Isolation of Data: Available
information in one application may not be
known.
Limited data sharing
Duplication or redundancy of data
Data dependency on the application
Incompatible file formats between different
applications and programs creating inconsistency.
Fixed query processing which is defined during
application development
19
Cont…
The most significant problem experienced by the
traditional file based approach of data handling is
the “update anomalies”. 3 types
1. Modification Anomalies: a problem experienced
when one or more data value is modified on one
application program but not on others containing the
same data set.
2. Deletion Anomalies: a problem encountered where
one record set is deleted from one application but
remain untouched in other application programs.
3. Insertion Anomalies: a problem encountered where
one can not decide whether the data to be inserted is
valid and consistent with other similar data set.
20
3. Database Approach
Codd in 1970, proposed database presented us tables or
relations for the users
Behind the scenes, complex data structure that response to a
queries.
Thus in Database Approach:
A computerized record keeping system
Collection of logically related data contains entities,
attributes, relationships, and business rules of an
organization's information.
designed to meet the information needs of an organization.
Metadata(data about the data)
The purpose store, update and retrieve information.
Database is deigned once and used simultaneously by many
users.
program data independence.
21
Benefits of the database approach
Data can be shared
Improved accessibility of data
Redundancy can be reduced
Quality data can be maintained:
Inconsistency can be avoided:
Transaction support can be provided:
Security majors can be enforced
Centralized information control:
22
Limitations and risk of Database Approach
Introduction of new professional and
specialized personnel.
Complexity in designing and managing data
Extra cost and risk during conversion from
the old to the new system
High cost incurred to develop and maintain
Complex backup and recover services from
the users perspective
Reduced performance due to centralization
High impact on the system when failure occur
23
Database Management System (DBMS)
DBMS is a Software package used storage , and access
large data .
A DBMS provide a method for creating, updating,
storing, retrieving data in a database.
DBMS should at least have the following services to
provide to the user.
◦ Data storage, retrieval and update in the database
◦ A user accessible catalogue
◦ Transaction support service
◦ Concurrency Control Services
◦ Recovery Services
◦ Authorization Services (Security)
◦ Support for Data Communication
◦ Data independency
24
DBMS and Components of DBMS
Environment
Data Definition Language (DDL):
◦ define each data element required by the organization. E.g. (CREATE,
ALTER, &DROP )
Data Manipulation Language (DML):
◦ Language used to store, retrieve, and access the data .E.g. (insert,
delet, update , select)
Data Dictionary: used to store &organize information about the data
Data control language: helps DA to control the Database
27
Cont…
4. Implementation: the testing and
deployment of the designed database for use.
5. Operation and Support: administering
and maintaining the operation of the database
system and providing support to users.
28
Roles in Database Design and Use
1. Data Base Administrator (DBA)
Responsible to control and manage the database resources
Authorizing access to the database
Responsible for determining and acquiring hardware and
software resources
Accountable for problems like poor security, poor
performance of the system
Involves in all steps of database development
For big organizations having huge amount of data and user
requirement.
◦ DA:- responsible on management of data resources.
◦ DBA:- is responsible for technical (physical realization), security,
29
Cont…
2. DataBase Designer (DBD)
Identifies the data to be stored
understand the user requirement and choose
how the user views the DB.
We have two DBD :- logical and
conceptual design and another involving in
physical design.
30
Cont…
A. Logical and Conceptual DBD
Identifies data (entity, attributes and
relationship) relevant to the organization
Identifies constraints on each data
Understand data and business rules in the
organization
Sees the database independent of any data
model at conceptual level and consider one
specific data model at logical design phase.
31
Cont…
B. Physical DBD
Take logical design specification as input
and decide how it should be physically
realized.
Map the logical data model on the specified
DBMS
Select specific storage structure and access
path to the database
Design security measures required on the
database
32
Cont…
3. Application Programmer and Systems
Analyst
35
Actors On the Scene:
Data Administrator
Database Administrator
DatabaseDesigner
End Users
36
Workers Behind the Scene
DBMS designers and implementers: who
design and implement different DBMS
software.
Tool Developers: experts who develop
software packages that facilitates database
system designing and use.
Operators and Maintenance Personnel:
system administrators who are responsible for
actually running and maintaining the hardware
and software of the database system and the
information technology facilities.
37
ANSI-SPARC Architecture purpose and origin
39
External Level
Users' view of the database.
Describes that part of database that is
relevant to a particular user.
Different users have their own
customized view of the database
independent of other users.
40
Conceptual Level
Community view of the database.
Describes what data is stored in database
and relationships among the data.
41
Internal Level
Physical representation of the database on
the computer.
Describes how the data is stored in the
database.
42
Cont…
43
Defines DBMS schemas at three levels
Internal schema describe physical storage structures and
access paths.
◦ Typically uses a physical data model. i.e. specific DBMS
Conceptual schema describe the structure and constraints
for the whole database for a community of users.
◦ Uses a conceptual or an implementation data model.
External schemas describe the various user views.
◦ Usually uses the same data model as the conceptual level.
44
logical and physical data independence
Logical Data Independence
• Refers to immunity of external schemas to changes in conceptual
schema.
• The capacity to change the conceptual schema without having to
change the external schemas and their application programs.
Physical Data Independence
• The ability to modify the physical schema without changing the logical
schema
• Changes in physical schema may be
45
Cont…
46
Data Model
Data Model is a collection of tools or
concepts for describing
◦ Data
◦ Data relationships
◦ Data semantics
◦ Data constraints
The main purpose of Data Model is to
represent the data in an understandable
way.
47
Database Languages
Procedural : user specifies what data is
required and how to get the data.
Non-Procedural : user specifies what data
is required but not how it is to be retrieved
48
Thank you
?
49