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

database system chapter1

Uploaded by

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

database system chapter1

Uploaded by

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

Database Systems

(SWEG2108)

Chapter – 1
Introduction to Database Systems
Chapter 1 Outline
• Introduction:
– What is data, database, etc..
– Database characteristics
– What is DBMS
– Typical Database System
• Data Management Approaches:
– Manual Approach
– File Approach
– Database Approach
• DBMS: Functions
• Database System Environments

06/16/22 2
Introduction

•What is Data, Database, DBMS?


o Data: data is a collection of raw facts and figures.
• E.g. Class, B, 57, 207, etc. have no particular meaning.
o Information: processed data on which decisions and actions
are based. E.g. The DB class is B57, Room 207
o File is a collection of related data stored in secondary
memory.
o Database: database is a collection of interrelated data.
o DB Application is a program that interacts with the DB at
some point in its execution.
o DBMS: is a software package designed to store and manage
databases.
• E.g. Access, My-SQL, SQL, Oracle etc.
06/16/22 3
What is Record, Tuples, Field, Attribute, Domains,
Table, Relation, Database..?
 Record: Collection of related data items, e.g. The example the three data
items had no meaning.
 Information: But if we organize them in the following way, then they
collectively represent meaningful information.

 Table or Relation: Collection of related records.

 The columns of this relation are called Fields, Attributes or Domains.


 The rows are called Tuples or Records.

06/16/22 4
Terms: Record, Tuples, Field, Attribute, Domains,
Table, Relation, Database …..
 Database: Collection of related relations. Consider the following collection
of tables.

 Discussion: We now have a collection of 4 tables. They can be called a “related collection”
because we can clearly find out that there are some common attributes existing in a selected
pair of tables. Because of these common attributes we may combine the data of two or more
tables together to find out the complete details of a student. Questions like “Which hostel
does the youngest student live in?” can be answered now.
06/16/22 5
Introduction

•Database Systems Applications


o Sales: For customer, product, and purchase information.
o Accounting: For payments, receipts, account balances, assets and other accounting
information.
o Human resources: For information about employees, salaries, payroll taxes, and
benefits, and for generation of paychecks.
o Manufacturing: For management of the supply chain and for tracking production of
items in factories, inventories of items in warehouses and stores, and orders for items.
o Online retailers: For sales data noted above plus online order tracking,generation of
recommendation lists, and maintenance of online product evaluations.
o Banking: For customer information, accounts, loans, and banking transactions.
o Universities: For student information, course registrations, and grades
o Airlines: For reservations and schedule information. Airlines were among the first to
use databases in a geographically distributed manner.
o Telecommunication: For keeping records of calls made, generating monthly bills,
maintaining balances on prepaid calling cards, and storing information about the
communication networks.
o Activity: Can you call more application areas of database?
06/16/22 6
Introduction

•Database Systems
•A database is organized collection of related data of an
organization stored in formatted way which is shared by multiple
users.
•The main feature of data in a database are:
o 1. It must be well organized
o 2. It is related
o 3. It is accessible in a logical order without any difficulty
o 4. It is stored only once
•Example: Suppose the roll no, name, address of a student stored
in a student file. It is collection of related data with an implicit
meaning. Data in the database may be persistent, integrated and
shared.
06/16/22 7
Introduction

•Database Systems

•Discussion: Within a company there are different departments, as well as customers, who
each need to see different kinds of data. Each employee in the company will have different
levels of access to the database with their own customized front-end application.
06/16/22 8
 A simplified Database System Environment.

06/16/22 9
Data Management Approaches

Data Management (keeping your data records)can


be done:
 Manual Approach
 File-Based Approach
 Database Approach

All methods of data handling are in use to


some extent.

06/16/22 10
1. Manual File Handling Systems
 The primitive and traditional way of information handling where
cards and papers are used for the purpose.
 Manual Approach:
 Requires intensive human labour
Write Events and objects on files (paper)
Label and store files in one or more cabinets.
Keep cabinets in safe places for security purpose.
Insertion and retrieval is done by searching first for the right
cabinet then for the right file, then the information.
One could have indexing system to facilitate access to the data.

06/16/22 11
 Example Personal Calendar
 We might start by building a file with the following
structure:
What Day Time With_whom Where

Lunch 10/24 1pm Abebe Bole


Shop 10/26 9am Ayele Piassa
Dinner 10/26 6PM Elfinesh Café

 This calendar is easy to deal with.

06/16/22 12
 Let us also build our address book
Name Phone#
– Abebe A. 0911164743
– Seble K. 0912150844
– Ayele L. 0913170841
– Elfinesh W. 0911169673
– Ermias H. 0912151043
– Worku A. 0911199904
– Worku D. 0912620410
– Abebe D. 0914556768

06/16/22 13
Limitations of Manual File Handling
A) Problem of Data Organization
 Suppose we want to cancel one of our appointments.
 Two conceptual “entities” -- address and calendar -- with a
relationship between them, linking people in the calendar to their
contact information.
B) Problem of Efficiency
 Size of your personal address book is probably less than one hundred
entries, but there are things we'd like to do quickly and efficiently.
 “Give me all appointments on 10/28”
 “When am I next meeting Dr. Dawit?”
 What would happen if you were using a business calendar with hundreds
of thousands of entries?

06/16/22 14
Limitations of Manual File Handling …
C) Prone to error
D) Difficult to update, retrieve, integrate
E)You have the data but it is difficult to compile the
information
F) Significant amount of duplication of data
G) Cross referencing is difficult

 SOLUTION: TWO computerized approaches


 File Based Approach  Decentralised
 Database Approach Centralised

06/16/22 15
File Based Approach

06/16/22 16
Database Approach

06/16/22 17
2. File-Based Approach

 File based systems were an early attempt to computerize the manual filing
system.
 This approach is a decentralized computerized data handling method - to
develop a program or a number of programs for each different application.
 Since every application defines and manages its own data, the system is
subjected to serious data duplication problem

06/16/22 18
Limitations of File-Based systems
 Data Redundancy (Duplication of data)
• Same data is held by different programs
• Wasted space (Uncontrolled duplication of data)
 Separation and isolation of data
• Each program maintains its own set of data.
• Users of one program may be unaware of potentially useful data
held by other programs.
• Limited data sharing
• Special codes for different queries
 Data Inconsistency and confusion
• Eg. Consider an organization
• Personnel Department stores details relating to each member.
• Payroll Department stores salaries of each staff

06/16/22 19
Limitations of File-Based systems…
 Data Dependence
• File structure is defined in the program code and is
dependent on the application programming language.
• Each application program must have its own processing
routines for reading, inserting, updating and deleting data.

 Incompatible file formats (Lack of Data Sharing and


Availability)
• Programs are written in different languages, and so cannot
easily access each others files.
• Eg. personnel writes in C
payroll writes in COBOL

06/16/22 20
Limitations of File-Based systems…

Difficulty of Data Sharing: Suppose payroll wants to know when
a certain employee will be on pension. It is difficult to share this
information unless we have another application programmer to
write software to convert the files to some common format.

Poor Security and Administration: Unauthorized people may
access the data.

Anomalies: Three types:
(1) Modification Anomalies: A problem experienced when one or
more data value is modified on one application program but not
one 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 experienced whenever there is
a new data item to be recorded, and the recording is not made in
all the applications.
06/16/22 21
3. Database Approach

 The limitation of the file based can be attributed to two


factors:
 Definition of data is embedded in the application programs,
rather than being stored separately and independently.
 There is no control over the access and manipulation of data
beyond that imposed by the application programs.

 To become more effective, a new approach was required by


the name Database Approach.
 What emerged were the database and database management
systems.
 A single repository of data is maintained

06/16/22 22
3. Database Approach…
 A Database is a shared collection of logically related data
designed to meet the information needs of an
organization- (Centralized System).

– Logically related data comprises entities, attributes, and


relationships of an organization's information.
– System Catalog (Data Dictionary or Metadata) provides
the description of the data to enable program–data
independence.
– The database contains not only the database itself but
also a complete definition or description of the
database.

06/16/22 23
3. Database Approach…
 This definition is stored in the system catalog, which
contains information such as the structure of each
file, type and storage format of each data item and
various constraints on the data..
 The information stored is called metadata and it
describes the structure of the primary database.

06/16/22 24
DBMS Functions
 A DBMS performs several important functions that guarantee the
integrity and consistency of the data in the database.
 Most of those functions are transparent to end users, and most
can be achieved only through the use of a DBMS.

06/16/22 25
DBMS Functions…

 Data Dictionary Management


 Data Storage Management
 Data Transformation and Presentation
 Security Management
 Multiuser Access Control
 Backup and Recovery Management
 Data Integrity Management
 Database Access Languages and Application Programming Interfaces
 Database Communication Interfaces

06/16/22 26
Advantages of Database Systems

 Data can be shared: two or more users can access and use same
data instead of storing data in redundant manner for each user
 Improved Data Accessibility - By using structured query
languages, the users can easily access data without programming
experience.
 Redundancy can be reduced: Isolated data is integrated in
database to decrease the redundant data stored at different
applications
 Quality data can be maintained: the different integrity
constraints in the database approach will maintain the quality
leading to better decision making.
 Inconsistency can be avoided: controlled data redundancy will
avoid inconsistency of the data in the database to some extent.

06/16/22 27
Advantages of Database Systems…

 Transaction support can be provided: Basic demands of any


transaction support systems are implanted in a full scale DBMS.
 Integrity can be maintained: Data at different applications will be
integrated together with additional constraints to facilitate shared data
resource
 Security measures can be enforced: the shared data can be secured
by having different levels of clearance and other data security
mechanisms.
 Improved decision support: the database will provide information
useful for decision making
 Standards can be enforced: the different ways of using and dealing
with data by different units of the organization can be balanced and
standardized by using database approach.

06/16/22 28
Advantages of Database Systems…
 Less Labor: Unlike the other data handling methods,
data maintenance will not demand much resource
 Centralized information control: Since relevant data in
the organization will be stored at one repository, it can be
controlled and managed at the central level.
 Data Independence - Applications insulated from how
data is structured and stored

06/16/22 29
Limitations and Risk of DB Approach
 Although the database system yields considerable advantages
over previous data management approaches, database
systems do carry significant disadvantages.

1)Increased Costs.
– Database systems require sophisticated hardware and software
and highly skilled personnel.
– The cost of maintaining the hardware, software, and personnel
required to operate and manage a database system can be
substantial.
– Training, licensing, and regulation compliance costs are often
overlooked when database systems are implemented.

06/16/22 30
Limitations and Risk of DB Approach…
2) Management Complexity:
– Database systems interface with many different
technologies and have a significant impact on a company’s
resources and culture.
3) Maintaining Currency:
– To maximize the efficiency of the database system, perform
frequent updates and apply the latest patches and security
measures to all components. Because database technology
advances rapidly, personnel training costs tend to be
significant.
4) Vendor Dependence:
– Given the heavy investment in technology and personnel
training, companies might be reluctant/unwilling to change
database vendors.
5) Frequent Upgrade/Replacement Cycles
– DBMS vendors frequently upgrade their products by adding
new functionality.
06/16/22 31
Database System Environment

 The term database system refers to an organization of


components that define and regulate the collection, storage,
management, and use of data within a database environment.
 From a general management point of view, the database system is
composed of the five major parts: hardware, software, people,
procedures, and data.

06/16/22 32
Database System Environment

06/16/22 33
Database System Environment

06/16/22 34
Database System Environment

06/16/22 35
Database Development Methodology
• We can not develop a database through judgment. (though
possible)

• If we are using judgment, we have to make a lot of trials to


develop a good database.

• What does judgment cost us


– cost wise – cost may be much higher than the be??
– It might take a lot of time before the database is fully used

• To minimize cost, time, and effort,


– We have to be well planned – to avoid trial and error
– we have to follow a certain set of methodologies when developing a
database.

06/21/22 SWEG2108 36
Database Development Lifecycle (Can
not be developed by judgment!!!)
• Database planning
• Requirements collection and analysis
• Define Problems and Constraints
• Database design
• DBMS selection
• Prototyping
• Implementation
• Data conversion and loading
• Testing
• Operational maintenance

06/21/22 SWEG2108 37
12
Database Planning
– Analyze the Company Situation
• What is the organization’s general operating environment, and what is its mission within
that environment?
• What is the organization’s structure?
– Identifies work to be done; the resources with which to do it; and the money to pay for it all.
– preliminary assessment (time, budget, etc..)
– Integrated with the overall IS strategy of the organization.

Requirements Collection and Analysis


• Designer’s efforts are focused on
– Information needs, Information users.
– Information sources. Information constitution.
• Sources of information for the designer
– Developing and gathering end user data views
– Direct observation of the current system: existing and desired output
– Interface with the systems design group
• The designer must identify the company’s business rules and analyze their impacts.
• Use different fact finding techniques (interview, questionnaire, document analysis)

06/21/22 SWEG2108 38
14
Define Problems and Constraints - described in the user’s
language
• How does the existing system function?
• What input does the system require?
• What documents and reports does the system generate?
• How is the system output used? By Whom?
• What are the operational relationships among business units?
• What are the limits and constraints imposed on the system?
• Use modeling techniques for formal documentation (Eg. DFD)

Database Design – converting requirement to database


• Major aims
– Identify functions the database will perform
– Represent data and relationships between data that is required by all
major application areas and user groups.
– Provide data model that supports any transactions required on the
data.
– Specify a minimal design that is appropriately structured to achieve
the stated performance requirements for the system such as
response times.

06/21/22 SWEG2108 39
17
DBMS Selection
• The selection of an appropriate DBMS to support the database application.
• Undertaken at any time prior to logical design provided sufficient information is
available regarding system requirements.
• Also design the user interface and the application programs using the selected
DBMS

Prototyping: Building a working model of a database application.


• Purpose
– To identify features of a system that work well, or are inadequate
– To suggest improvements or even new features
– To clarify the users’ requirements
– To evaluate the feasibility of a particular system design.

06/21/22 SWEG2108 40
21
Prototype Development Stages

06/21/22 SWEG2108 41
24
Implementation
• The physical realization of the database and application designs.
– Use DDL of DBMS to create database schemas and empty database
files.
– Use DDL to create any specified user views.
• Data Conversion and Loading
– Transferring any existing data into the new database and converting
any existing applications to run on the new database.
– Only required when a new database system is replacing an old
system.
– DBMS normally have a utility that loads existing files into the new
database.
– Where applicable, it may be possible to convert and use application
programs from the old system for use by the new system.

06/21/22 SWEG2108 42
25
Testing
• The process of executing the application programs with the intent of finding
errors.
– Use carefully planned test strategies and realistic data.
– Testing cannot show the absence of faults; it can show only that
software faults are present.
– Demonstrates that database and application programs appear to be
working according to requirements.
Operational Maintenance
– The process of monitoring and maintaining the system following
installation.
– Monitoring the performance of the system.
– If performance falls, may require reorganization of the database.
– Maintaining and upgrading the database application (when required).
– Incorporating new requirements into the database application.

06/21/22 SWEG2108 43
27
Life Cycle
Database Planning

Systems Definition

Requirements Collection
and analysis

Application
DBMS Database Design Design
Selection
Implementation

Data Conversion and loading


Prototyping

Testing

Evaluation & Maintenance


06/21/22 SWEG2108 44

You might also like