Databases
Databases
Databases Lesson 1
Instructor: Sahar Arif
Email: [email protected]
What is a
Databases?
A database is a
collection of
organized data,
information and
records.
Purpose of a
Database
Database is information that a person
needs in his personal, business, social
and religious life and the power and
purpose of information is not only in
collecting and finding them but more
importantly in using them.
Kinds of Databases
Structured database Free-form database
It is also called the structured It is a loose collection of
data in which a record or information, such as
file of information arranged
in uniform format. These
those you will find on
databases are usually the World Wide Web. A
storage of information with collection of your
similar entries such as a documents in the
list of persons born in a computer made from
country, a medical
several programs can
database of patients’ data,
an inventory database of a be considered as free-
company and many others. form database.
Types of Databases
Operational database Analytical database
It is a dynamic database It is a static database,
that is used by any where data is rarely
organization in its day- modified. This
to-day operation. They database is often used
are used to collect to store and track
data, maintain, modify historical data to
and delete data. make long term
projections and
analysis.
Structured
Database
Models
Hierarchical Model
This model can be visualized
as a parent –child relationship
wherein a child may only have
one parent but parent can
have several other children.
As previously mentioned,
moderm database utilize the
relational database model and
many of today’s software
caters to this type of
structured database.
Things you can do with
RDBMS
Create a database
Information storage
Information retrieval
Information management
Information analysis
Print and share information
Relational
Database
Terminologies
Data
It is a number or
value found and
stored in the
database. Data is
static because it
remains the same
until it is modified
by a process.
Information
It is a data that has
been processed
thereby making it.
Relevant and
meaningful to the
person viewing it..
Information is
dynamic because it
changes relative to
the data stored in the
database and it could
be processed in many
ways.
Null
It is used to represent
a value that is
unknown or missing.
A null value is niether
a zero nor a blank.
Table
It is the main
structure in the
relational database. It
is composed of
attributes (fields) and
domain (records). A
table almost always
represents a subject
that can be an object
(person, place, or
thing) or an event.
File
It is an organized
collection of data
about an entity. As an
example, for a
bookstore, a file
called “Branch” can
contain all the data
about a particular
bookstore branch.
Record
It refers to a specific person,
place, thing, or event. Record
is also known as the “tuple” in
the relational database
terminology. It pertains to
structure in the database table
representing a unique
instance of a subject.
Field
It is the smallest
structure of a data
from a larger
database structure in
a relational database.
A field can store data
in a database and
represent a
character opf the
subject to which
database table it
resides.
View
It is also known as a
virtual table . It is
called a virtual table
since it does not hold
data on its own;
rather it gets data
from the table which
it is based. And since
it comes from other
table it is composed
of several fields
coming from one or
more data.
Keys
These are fields that
serve specific purposes
within a table. There are
two types of keys, the
primary key and the
foriegn key .
The connection
between the two
tables will be difficult
to establish and will
Designing a Database
Define the purpose of your database. Consider the
questions or queries you may want to answer about
the stored data.
Determine the tables that you need in the databse.
Determine the fields that you need in the database.
Determine the relationships between tables. A
relationship works by matching data in the key fields
which is usually a field with the same name in both
tables.
Characteristics of a Well-
Designed Database
Modify data is easy. Changes to the value of one field
within the table should not affect the values of the
fields in the table.
Retrieving information is easy. Extracting desired
information from tables with well defined
relationships should make accessing and retrieving
data a lot faster.
Developing and building user application is easy.
Data manipulation would be the main focus of
programming and not solving the problems
associated with a poorly designed database.
Maintaining the structure is easy. Changes made to
any table. Or columns should not affect other tables
or columns.