Introduction To Databases: Course Introduction A Review of Database Concepts
Introduction To Databases: Course Introduction A Review of Database Concepts
Course Introduction
A Review of Database
Concepts
Introduction 1
Learning Outcomes
Be able to understand the importance of
data, and the difference between file
management and databases.
Be able to understand database concepts,
Database system components
Be able to discuss, explain and apply SQL
using one commercial DBMS
Be able to implement a database design
using one commercial DBMS
What is data?
Data is the building block on which every
organization is built to operate.
Data takes varied forms
Name of a new employee, average marks
that Joe scored in her exams are examples of
data
More about Data
Data may be manipulated and reorganized to
produce information
For example: the marks that Joe scored will
come in handy when calculating and
displaying class wise performance
In order to use data to extract information,
data must be stored
Manual Systems
Data is written within books and registers.
For example, details of faculty are maintained
in a staff register and details of students are
entered in a Student register
Time consuming
Consider a task of preparing mark sheets for
students manually.
Manual Systems – A thing of
the past
Now, computers can be used for storing data,
retrieving and even manipulating data in
different combinations to obtain required
information very easily.
Success of an organization depends on its
ability to acquire accurate, reliable and timely
data about its business or operation for
effective decision –making process.
Databases overview
Databases are the primary form of storage in
both today's online and offline worlds.
Databases are used to store millions of
different types/combinations of information
including product details, employees,
personal address books, news, etc.
Before you can begin to design a database
however, you must understand the underlying
concepts and theories of why databases are
used and how they are created.
Why Databases were created
Databases keep track of, and organize, data.
Data is the essence of any business or organization.
A database is sometimes referred to as a “DBMS”,
or Database Management System.
Microsoft Access, for example, is a DBMS, along
with Microsoft SQL Server, MySQL and Oracle.
Databases use queries.
Queries interact with the database to extract, insert
and delete records, or otherwise work with the
database's data.
Why Databases were created
Sort your information into any order, e.g. a phone book on
computer could be sorted by postcode, name of the town,
area code etc.
Finding people is much easier. Unlike a paper system,
you are not reliant on one key piece of information, e.g. to
find someone in a phone book you have to know their
surname. If the phone book was on a computer, you could
know their address, their first name etc, and still use it to
find them!
You do not have to see all the information at once. The
information that you wish to see can be extracted from the
whole, e.g. all the people who live in London, all the
people who are 3 months late in paying their bill etc.
Why Databases were created
Information can be cross-referenced, which
would be impossible on paper, e.g. you may
want to see everyone who lives in London
and is also 3 months late with paying their
bill.
Updates are much easier on a computer.
You can quickly delete or edit the information.
Computers use less space than a large
paper filing system.
Evolution of databases
Before computers, data was written in registers
Databases existed earlier also but in the form of
files.
Data was stored in tabular format, with the rows in
the table being called ‘records’ columns called
‘fields’
All the data was put into one table and the term
database was used synonymously with ‘table’.
Flat-File Databases
The table below displays a flat-file database with
some fields in it
Wasted space
Potential inconsistencies (most important!)
The process of updating information in a file filled with
repeating data eats terrible amounts of time
A file storing information
Data
Redundancy
Suppose……
Let's say a person moves houses and has his
phone number changed.
Instead of changing one record, three or four
must be changed.
In a corporate environment with thousands of
records, this would take far too much time to
complete, and the system's resources would
take a major hit because of it.
Indexed File System – not an
end to all the problems
Problems Continued…
Data Inconsistency
This refers to maintaining the consistency of the same data in the
various files
For example: Assume Ms. Jones changes her name to Mrs.
Jackson and the change is reflected only in some of the files
containing her data. Result – inconsistency
Another example would be if the name and address of the
members were to be stored every time a member borrowed a
book, there could be inconsistency creeping in
Another example would be removal of employee’s record from
‘Salary Details’ file while maintaining the employees details in
another file
Security
Data stored in these systems could be easily accessed by anyone,
and therefore prone to misuse
Example of Data Inconsistency
Member Code Name Address Book Code
DB engine:
Heart of DB
Responsible for storing, retrieving & updating data
Can be purchased separetly
E.g “Jet Engine” ------ foundation of MS Access
Data dictionary:
Contains deifnitions of all the data, tables
Describe types of data stored
Allows DBMS to keep track the data
Helps developers & users to find the data they need
Components of DBMS
Query Processor:
Enables developers & users to sore and retrieve data
When a query runs , it works with the engine to find the
appropriate data
Report writer:
Enables a user to setup a report to show how items will be
displayed or calculated without writing any program code
Can be integrated into DBMS or can be a tand alone
application
when the report is executed, the report writer passes the
query to query processor which communicates with the DB
engine to retrieve the desired row of data report writer than
formats the data & create the report
Components of DBMS
Forms generator:
Is used to create input forms
Application generator:
It is a collection of forms and reports designed for specific
user task
Consist of tools that assist the developer in creating a
complete application package
Components of DBMS
All data
DB engine 3GL
Communication
network DB dictionary Communication
security (Provides utilities
Query processor to connect lang
with engine)
Form Report
program
builder writer
Application generator
Features and Responsibilities
of a DBMS
Control Data Redundancy:
Since data is spread across several tables,
repetition or redundancy of data is reduced
Data Abstraction:
The DBMS hides the actual way in which data is
stored, while providing the user with a conceptual
representation of data
Features and Responsibilities
of a DBMS
Data in
the
backend
can be
displayed
in a form
Features and Responsibilities
of a DBMS
Restricting Unauthorized Access
DBMS provides security mechanism that ensures
that data in the database is protected from
unauthorized access and malicious use.
The security that is implemented in most DBMS is
referred to as ‘User-level security’.
In addition, a particular user could be restricted to
only view the data, while another could have the
rights to modify the data. A third user could
change the structure of some table
Features and Responsibilities
of a DBMS
Enforcing Integrity Constraints
DBMS provides a set of rules that ensure that
data entered into a table is valid
For example, in the item table, a constraint can be
added to ensure that the ‘rate’ field only accepts
numeric type of data that must be in the range 1 -
500.
Features and Responsibilities
of a DBMS
Backup and Recovery
In spite of ensuring that the database is secure
from unauthorized access as well as invalid
entries, there is always a danger that the data
could get lost.
Can happen due to system crashes or some
hardware problem
To guard against this, the DBMS has inbuilt
backup and recovery techniques that ensure that
the database is protected from these kinds of
fatalities also.
Users of DBMS
Users of a database can be categorized into
four groups
Database Designers:
People who analyze the kind of data that is to be
stored in the database, and would design the
structure of the database.
Database Administrator
Person who monitors operations on a database
and ensures that it is maintained efficiently
Users of DBMS
Application Developer:
People who write programs for accessing the
database.
End User:
Entry of data and manipulation of this data is
taken care of by the end user.
Functions of a DBA
Provides necessary support for implementing policy
decisions of DB.
A central controller who oversees & manages all the
resources e.g. DB,DBMS & related sw
Authorized access to DB carries out changes or
modification to reflect the changing needs of the
organization
Maintains periodical back-up of the DB to prevent
data loss
Responsible for repairing damage to DB
Microsoft Access 2007
For the lab sessions we will be working on
Access 2007, a DBMS.