You are on page 1of 19

Chapter –1

Database System

1
Introduction to Database
What is a Database?
Database is a collection of data which is related by some
aspects in the managed form.
Database is nothing more than a collection of shared
information that exists over a long period of time.
The term database refers to a collection of data that is
managed by a DBMS.

2
Evaluation of database
 Database Management System (DBMS): A collection
of programs that enables you to store, modify, and
extract information from a database.
 There are many different types of DBMSs, ranging from
small systems that run on personal computers to huge
systems that run on mainframes.
 Well-known DBMSs include: Microsoft Access, MySQL,
Microsoft SQL Server, Oracle, SAP HANA, dBASE,
FoxPro, IBM DB2, LibreOffice Base, FileMaker Pro and
InterSystems Caché, MariaDB, PostgreSQL,

3
Thus, the 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

4
Database System Applications
 Databases are widely used. Here are some
representative applications:
• Banking: For customer information, accounts,
loans, and banking transactions.
• Airlines: For reservations and schedule
information. Airlines were among the first to use
databases in a geographically distributed manner
terminals situated around the world accessed the
central database system through phone lines and
other data networks.
• Universities: For student information, course
registrations, and grades.
• Credit card transactions: For purchases on credit
cards and generation of monthly statements. 5
…cnt’d
• Telecommunication: For keeping records of calls
made, generating monthly bills, maintaining balances
on prepaid calling cards, and storing information about
the communication networks.
• Finance: For storing information about holdings, sales,
and purchases of financial instruments such as stocks
and bonds.
• Sales: For customer, product, and purchase
information.
• Manufacturing: For management of supply
chain and for tracking production of items in
factories, inventories of items in
warehouses/stores, and orders for items.
• Human resources: For information about
employees, salaries, payroll taxes and benefits,
and for generation of paychecks. 6
Database Approach
 Data management passes through the different levels of
development along with the development in technology
and services. These levels could best be described by
categorizing the levels into three levels of development.
1. Manual Approach
2. Traditional File Based Approach
3. Database Approach

7
1. Manual Approach
 In the manual approach, data storage and retrieval
follows the primitive and traditional way of information
handling where cards and paper are used for the
purpose.
 The data storage and retrieval were performed using
human labor.
Limitations of the Manual approach
 Prone to error, update, retrieve, integrate
 You have the data but it is difficult to compile the
information
 Limited to small size information
 Cross referencing is difficult.

8
2. Traditional File Based Approach
 After the introduction of Computer for data processing
to the business community, the need to use the device
for data storage and processing increase.
 There were, and still are, several computer applications
with file based processing used for the purpose of data
handling.
 Even though the approach evolved over time, the basic
structure is still similar but not identical.

9
Limitations of the Traditional File Based
approach
 As business application become more complex
demanding more flexible and reliable data handling
methods, the shortcomings of the file based system
became evident.
 These shortcomings include:
 Separation or Isolation of Data: Available information in one
application may not be known.
 Limited data sharing
 Lengthy development and maintenance time
 Duplication or redundancy of data
 Incompatible file formats between different applications and
programs creating inconsistency.
 Fixed query processing which is defined during application
development
10
…cnt’d
 The most significant problem experienced by the
traditional file based approach of data handling is the
“update anomalies”. We have three types of update
anomalies;
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 experienced whenever
there is new data item to be recorded, and the
recording is not made in all the applications.

11
3. Database Approach
 Database approach should present the user with a view
of data organized as tables called relations.
 The database approach emphasizes the integration and
sharing of data throughout the organization.
 Thus in Database Approach:
 Database is just a computerized record keeping

system or a kind of electronic filing cabinet.


 Database is a repository for collection of computerized

data files.
 Database is a shared collection of logically related data

designed to meet the information needs of an


organization.

12
…cnt’d
 The purpose of a database is to store information
and to allow users to retrieve and update that
information on demand.
 Database is deigned once and used simultaneously

by many users.
 Each database application will perform the

combination of creating database, reading,


updating and deleting data.

13
Benefits of the database approach
 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 accessibility of data: 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.
 Transaction support can be provided: basic demands of any
transaction support systems are implanted in a full scale DBMS.

14
…cnt’d
 Integrity can be maintained: data at different applications
will be integrated together with additional constraints to
facilitate shared data resource.
 Security majors can be enforced: the shared data can be
secured by having different levels of clearance and other
data security mechanisms.
 Speed: data storage and retrieval is fast as it will be
using the modern fast computer 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.
15
Limitations and risk of Database Approach
 Introduction of new professional and specialized
personnel.
 Complexity in designing and managing data
 High cost to be incurred to develop and maintain the
system
 Complex backup and recover services from the users
perspective
 Reduced performance due to centralization and data
independency
 High impact on the system when failure occurs to the
central system.

16
Basic Database Terminology
 Database – A collection of information.  A database is
comprised of one or more lists (called tables) of data
organized by columns, rows, and cells.
 Tables – The view that displays the data base as a
combinations of rows (records) and columns
(fields).  The cells contain the bits and pieces of data for
each record in each field.  The first row of a table is
reserved for the field names.
 Field names – Identify the different categories in a
database.  The top row is reserved for field
names.  Examples of field names are First name, last
name, address, city, state, zip, phone number.

17
…cnt’d
 Field – Categories in a database.  Fields are displayed in
columns.  For Example, in a database, the zip field
contains all the zip codes from each of the
records.  These are the bits and pieces of data.
 Records – Related information that is separated by
columns or fields.  A name and address are considered
one record in the database.  A second Name and address
are a different record.
 Cells - The intersection of columns and rows that contain
the data for each record.
 Data – All of the records of information in a database
including the field names.

18
…cntd
 Data Type-Each field can have only one kind of data.
That is called the Data Type of that field. This can be a
string, an integer, a date, etc.
 Primary Key-Primary key is a field that will uniquely
identify each row in the table. The value of this field will
be unique through
 Relation-There will be many cases when the data in one
table can be related to the data in another table.
This connection between two tables is called a relation.
 Foreign Key-When there is a relation between 2 tables,
these tables will be connected by inserting the primary
key of one table into the corresponding row of the other
table. The field used in such a way to connect two tables
is called the foreign key.
19

You might also like