Você está na página 1de 16

Basic Database Concepts

What is data ?
Data is raw, unorganized facts that
need to be processed
Example :
Each student's grade score is one
piece of data.

What is Information?
When data is processed, organized,
structured or presented in a given
context so as to make it useful, it is
called information.
Example:
GPA or CGPA of a student.

What is database?
A database is a collection of
information that is organized so that
it can easily be accessed, managed,
and updated.

Databases

Bank accounts
Stock control
Personnel systems
Product catalogues
Telephone directories
Credit card details
Student records
Stock market prices
Discussion boards

Database Users
End users
Use the database
system to achieve
some goal
Application
developers
Write software to
allow end users to
interface with the
database system

Database
Administrator
(DBA)
Designs &
manages the
database system
Database systems
programmer
Writes the
database software
itself

Database Management
Systems
A database is a
collection of
information
A database
management
system (DBMS) is
the software than
controls that
information

Examples:

Oracle
DB2 (IBM)
MS SQL Server
MS Access
Ingres
PostgreSQL
MySQL

What the DBMS does


Provides users with
Data definition
language (DDL)
Data manipulation
language (DML)
Data control
language (DCL)

DBMS provides
Persistence
Concurrency
Integrity
Security
Data independence
Data Dictionary
Describes the
database itself

Data Dictionary - Metadata


The dictionary stores information about
the database itself
This is data about data or metadata
Almost every aspect of the DBMS uses the
dictionary

Metadata
The dictionary holds
Descriptions of database objects
(tables, users, rules, views, indexes,)
Information about who is using which
data (locks)
Schemas and mappings

File Based Systems


File based
systems
Data is stored in
files
Each file has a
specific format
Programs that use
these files depend
on knowledge
about that format

Problems:
No standards
Data duplication
Data
dependence
No way to
generate ad hoc
queries
No provision for
security,
recovery,
concurrency, etc.

Relational Systems
Information is stored
as tuples or records in
relations or tables
There is a sound
mathematical theory
of relations
Most modern DBMS
are based on the
relational model

The relational model


covers 3 areas:
Data structure
Data integrity
Data manipulation

More details in the


next lecture

Tables
Relational databases views all data in the form of
tables
Each column represents an attribute, e.g. the
Customer table has attributes ID, Name,
Address..etc.
Relationships between entities are represented by
values stored in columns of the corresponding
tables, e.g. Customer_ID is an attribute of both
the Customer table and the Order table. This
makes it easy to link an order with its customer.

Fig. (b) Product and Customer tables

Fig. (a) Order and Order_Line tables

The range of
database applications
Personal Database PCs/PDAs, Cell phones
Workgroup Database. Designed to support
collaboration in a small team (less than 25 people)
Department Database typically larger than a
workgroup (25-100 people) and more diverse range of
functions e.g. personnel database
Enterprise Database scope of the whole organization.
May be more than one, as a single database for a large
organization may be impractical due to performance
difficulties for large databases, diverse needs of user
groups, and difficulty of achieving common definition
of data (metadata) for all users.

Você também pode gostar