Sunteți pe pagina 1din 19

INTRODUCTION TO

DATABASES
A database is...
• An information manager.
• Databases make it possible to store,
organize and retrieve information in ways
that otherwise would not be possible.
• Databases come in all sizes and shapes
from mainframe applications that run
multinational corporations to appointment
calendars in PDAs.
Why use a database?

 Storing information in a database has many benefits


 Organize and analyze in different ways
 Reports
Mailing labels
 Inventory
 Many advantages over other ways to store data
 Speed
 Reliability
Precision
 Ability to automate tasks
Why use a database?
• Databases make it easy to store large quantities
of information. The larger the mass of information,
the bigger the benefit of using a database.
• Databases make it easy to retrieve information
quickly and flexibly .
• Databases make it easy to organize and
reorganize information. You can quickly switch
between schemes.
• Databases make it easy to print and distribute
information in a variety of ways.
Database Organization

• Organized into one or more tables


• Tables store records
• Each record is a collection of fields
• Imagine your address book as a database
• Each listing in the address book is one
record
• Each record has information in fields
• Name
• Address
• City
Tables
• The core of a database is a table or series of
tables each table similar to a spreadsheet
• They are also made of rows records and
columns fields
NOTES

• Databases have a specialized vocabulary .


• A database is a collection of information stored in
an organized form in a computer.
• A database program is a software tool for
organizing storage and retrieval of that information.
• Many of the terms that describe the computer
come from the file cabinet terminology of the office.
• For databases, the term ‘file’ means a data file
that is a part of a database.
• A record is the information relating to one person,
item or event.
• Collection of interrelated data Set of programs
to access the data DBMS contains information
about a particular enterprise DBMS provides an
environment that is both convenient and efficient
to use. 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
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
Drawbacks of using file systems (cont.) + 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
Q Database systems offer solutions to all the above
 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
 E-R model of real world + Entities (objects)
E.g. customers, accounts, bank branch +
Relationships between entities
E.g. Account A-101 is held by customer Johnson
Relationship set depositor associates customers
with accounts
 Widely used for database design
+ Database design in E-R model usually
converted to design in the relational model
(coming up next) which is used for storage and
processing
• Structure of Relational Databases
• Relational Algebra
• Tuple Relational Calculus
• Domain Relational Calculus
• Extended Relational-Algebra-Operations
• Modification of the Database
• Views
Thank you for
listening!!
Neslyn Mariano
Brenette Fakat

S-ar putea să vă placă și