Você está na página 1de 36

RELATIONAL

DATABASES

Group 1
1.
2.
3.
4.
5.

ADITYA
DZAKY NURHAFIZH
M NAUFAL YUNAS
RIYAN A
SAFIRA

S & S Company

Early start
Scott Parry and Susan Gonzales formed
S&S to sell appliances and consumer
electronics
They invest some amount of money to
see the performance in the first six
months
Relevant information is needed to see the
performance of their investment

After grand opening..


Employees have been hired, ordered
inventory
But, the accounting records did not take
into account
Scott and Susan know a few about
accounting system, therefore they decide
to hire Ashton as an accountant to
accomplish the problems
With an enormous data to be proceed into
a relevant information, Ashton needs an
accounting information system to deal

S&S Overtrading
As it grows so quickly, the accounting
information system selected previously
cannot handle the overloaded data, and
that eventually create irrelevant
information
Therefore, Asthon works with CA
consulting firm to select and install new
AIS.
Asthon also realized that he needs to
have more understandable information to
evaluate the system. Good
documentation system will be required.

Summary

What is Relational Database?


A relational database is a collection of data
items organized as a set of formallydescribed tables from which data can be
accessed or reassembled in many different
ways without having to reorganize the
database tables.
The relational database was invented by E.
F. Codd at IBM in 1970.

Files vs Database
Database systems were developed to
address the problems associated with the
proliferation of master files.
For years, each time a new information need
arose, companies created new files and
programs.
The result: a significant increase in the number
of master files.

Files vs Databases
Master File 1
Fact A
Fact B
Fact C
Fact D

Master File 2
Fact A
Fact C
Fact E
Fact F

Master File 3
Fact A
Fact D
Fact E
Fact G

Sales
Program

Shipping
Program

Billing
Program

This proliferation of master


files created problems:
Often the same
information was stored
in multiple master files.
Made it more difficult to
effectively integrate
data and obtain an
organization-wide view
of the data.
Also, the same
information may not
have been consistent
between files.
If a customer
changed their phone
number, it may have
been updated in one
master file but not
another.

FILE VS. DATABASES


A database is a set
of inter-related,
centrally
coordinated files.

Database
Fact A
Fact B
Fact C
Fact D
Fact E
Fact F
Fact G

Database
Management
System
Sales
Program

Shipping
Program

Billing
Program

4-11

FILE VS. DATABASES


Database
Fact A
Fact B
Fact C
Fact D
Fact E
Fact F
Fact G

Database
Management
System

Sales
Program

Shipping
Program

Billing
Program

The database
approach treats
data as an
organizational
resource that
should be used by
and managed for
the entire
organization, not
just a particular
department.
A database
management
system (DBMS)
serves as the

4-12

FILE VS. DATABASES


Database
Fact A
Fact B
Fact C
Fact D
Fact E
Fact F
Fact G

Database
Management
System

Sales
Program

Shipping
Program

Billing
Program

The combination
of the database,
the DBMS, and the
application
programs that
access the
database is
referred to as the
database
system.
4-13

FILE VS. DATABASES


The person responsible
for the database is the
database
administrator.
As technology
improves, many large
companies are
developing very large
databases called data
warehouses.
Data Mining

Database
Fact A
Fact B
Fact C
Fact D
Fact E
Fact F
Fact G

Database
Management
System

Sales
Program

Shipping
Program

Billing
Program

Analysis to identify
relationships in the
data, new knowledge
about business
processes, etc.

4-14

Advantages of Database Systems


Data Integration

Files are logically combined and made


accessible to various systems.

Data Sharing

With data in one place it is more easily


accessed by authorized users.

Reporting flexibility

Reports can be revised easily and


generated as needed and the database
can be easily browsed to research a
problem or obtain detailed information
underlying a summary report

Advantages of Database Systems Cont

Minimizing Data Redundancy


and Data Inconsistency
Eliminates the same data being stored
in multiple files, thus reducing
inconsistency in multiple versions of
the same data.

Data Independence
Data is separate from the programs
that access it. Changes can be made
to the data without necessitating a
change in the programs and vice versa
4-16

Advantages of Database Systems Cont

Central management of data:


Data management is more efficient
because a database administrator is
responsible for coordinating, controlling
and managing data

Cross-Functional Analysis
Relationships between data from
various organizational departments
can be more easily combined.
Example: association between
sales and promotional campaigns

Advantages of Database Systems Cont


One-time Data Entry and Storage:
In the data-base approach to data
management data are input into the
data base once, stored in a particular
location and available for use my
multiple applications and users

4-18

Database Users and Designers


Different users of the database
information are at an external level of
the database. These users have logical
views of the data.
At an internal level of the database is
the physical view of the data which is
how the data is actually physically
stored in the system.
Designers of a database need to
understand users needs and the
conceptual level of the entire database

Physical View
Physical views of data
In file-oriented systems, programmers
must know the physical location and
layout of records used by a program.
They must reference the location,
length, and format of every field they
utilize.
When data is used from several files,
this process becomes more complex.

Physical View

4-22

Schemas
Describe the logical
structure of a
database
Conceptual Level
Organization wide
view of the data

External Level
Individual users view
of the data
Each view is a
subschema

Internal Level
Describes how data
are stored and
accessed
Description of
records, definitions,

4-23

Database Design
To design a database, you need to
have a conceptual view of the entire
database.
The conceptual view illustrates the
different files and relationships
between the files.
The data dictionary is a blueprint of
the structure of the database and
includes data elements, field types,

The Data Dictionary

4-25

DBMS Languages
Data Definition Language (DDL)
Builds the data dictionary
Creates the database
Describes logical views for each user
Specifies record or field security constraints
Data Manipulation Language (DML)
Changes the content in the database
Creates, updates, insertions, and deletions

Data Query Language (DQL)


Enables users to retrieve, sort, and display specific
data from the database

Report Writer
Simplifies report creation

Relational Database
Represents the conceptual and external
schema as if that data view were truly
stored in one table.
Conceptual View Example

Types of Attributes
Primary key
is the attribute, or combination of
attributes, that uniquely identifies a
specific row(record) in a table.

Foreign key

is an attribute in a table that is a


primary key in another table.
Foreign keys are used to link tables.

Other Non Key Attributes


Store other important data about the
entity

Basic Requirements of a Relational Database

1. Every column in a row must be single


valued
2. Primary keys cannot be null
3. Foreign keys, if not null, must have
values that correspond to the value of a
primary key in another value
4. All non key attributes in a table must
describe a characteristic of the object
identified by the primary key

Relational Data Tables

Primary Keys
Foreign Key (Customer # is a Foreign key in the
Sales Table because it is a Primary key that uniquely
identifies Customers in the Customer Table). Because of this,
the Sales Table can relate to the Customer Table (see red
arrow above).
4-28

What
are the
invoice
number
s of all
sales
made to
D. Ainge
and who
was the
sales
person
for each
sale?

How
many
televisio
ns were
sold in
October
?

What
are the
names
and
address
es of
custome
rs
buying
televisio
n?

Whar are
the sales
invoice
numbers,
dates,
and
invoice
totals for
October
sales?
Arrange
in
decendin
g order
by sales
amount!

What
are total
sales by
sales
person?

Suggestion for S&S


From the summary above, we know that the
relational DBMS can help S&S to easily
access the information they need to run
their business. We recommend S&S to
upgrade their AIS with the new system in
accordance with the needs of the S&S
Company

Você também pode gostar