0% found this document useful (0 votes)
12 views30 pages

Databases

Gxiyxohcph jopigxyoxitzutxiy

Uploaded by

Sahar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views30 pages

Databases

Gxiyxohcph jopigxyoxitzutxiy

Uploaded by

Sahar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

Introduction to

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.

Another way of looking at this


model is by visualizing an
inverted tree. The single table
acts as the root of the inverted
tree and the other tables act
as branches.

To access the data from one of


the tables, one has to pass
through the root table. This
model was popular in the
many IBM Information
Management Systems in the
1970s using mainframe
computers.
Network Model
This model was developed to
address in part the problems of
the hierarchical model. As
with heirarchical model, it
could be visualized as an
inverted tree; however, this
model allows many inverted
tress sharing branches but are
still part of the same database
structure.

As with the parent-child model,


the child is allowed to have
multiple parents. Unlike in the
heirarchical model access data
begins from the root table.

In the network model, it allows


access of data from any table .
This model was eventually
replaced by the relational
database model.
Relational Model
Was developed by Dr. E. F. Codd of
IBM in the 1970s partly to solve the
problems of the earlier databse
models as well as finding a of
making database management less
dependent on any application.

The terms relations, attributes and


domains are used frequently in
relational database models.

A relation is a table with columns


& rows.
Attributes are thje names given to
each colunm of the relation.
Domain is the value with which the
attribute will take.

A relational database is essentially


a collection of tables, and if a
databse is a collection of tables,
these tables are simply called
relations, hence, the name.
Entity-relationship
Model

This model was


written by
Peter Chen in
1976. This
model is an
abstract and
coceptual
representatio
n of data.
Relational
Database
Management
System
RDBMS is designed to creat,e,
maintain, manipulate,, modify
and delete information in a
relational database.

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 Primary key is a


field that uniquely
identifies a record in the
table.

The Foreign key is a


special field that
establishes a
relationship between
two tables.
Relationsh
ip
They exist
when two or
more tables
have
connection or
association .
Relationships
Primary key
Foreign key
Linking table is a table that
establishes a connection
between two or more tables
Types of
Relationships
When two or more tables are
related, there exist between
them a specific type of
relationship and there are
three types of possible
relationships.
One-to-One
relationships
This relationship
exist between
tables when only
one record of the
first table is
related to only
one record to a
second table, and
only one record of
the second table
is related to only
one record to the
first table.
One-to-Many
relationships
This relationship exist
between tables when one
record of the first table
can be related to one or
more records to a second
table, but only one record
from the second table
can be related to a single
record in the first table.

This relationship is the


most common
relationship that exist
between tables and helps
to reduce or eliminate
duplicate and redundant
data.
Many-to-Many
relationship
This relationship
exists between tables
when one record of
the first table can be
related to one or
more records to a
second table and one
record drom the
second table can be
related to one or
more records to the
first table.

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.

You might also like