Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Management System
Group 1
User 3 (Payroll)
Transactions
Data
Program 1
Program 2
Program 3
A,B,C
X,B,Y
L,B,M
Database Approach
User 1 (Sales)
Transactions
User 2 (A/R)
Transactions
User 3 (Payroll)
Transactions
Database
Program 1
Program 2
Program 3
D
B
M
S
A,
B,
C,
X,
Y,
L,
M
With the database approach, any User could change Bs address - it would be
changed for all users. changes. [Assume all users have authority to change
the
DBMS Operation
A user program sends a request for data
to DBMS.
The DBMS analyzes the request by
matching the called data elements
against the user view and the
conceptual view.
The DBMS determines the data structure
parameters from the internal view and
passes them to the operating system,
which performs the actual data retrieval.
Data Dictionary
Describes every data element in the
database
This enables all users to share a
common view of the data resource
and greatly facilitates the analysis of
user needs
Physical Database
is a representation of a data design
which takes into account the facilities
and constraints of a given database
management system.
Relational Database
Concepts
Entity
anything about which the
organization wishes to capture
data.
Two kinds of entity:
Physical
Conceptual
Send
s
Custo
mer
Payme
nt
Buys
Produc
t
Associations and
Cardinality
Cardinality
- is the degree of association between
two entities.
4
basic forms:
0, 1
1,1
0,M
1,M
Cardinality Notation
Crows foot
Write the cardinal values on
each end of the association line
connecting the two entities
Linkages Between
Relational Tables
Foreign keys
- physically connect related
tables to achieve the
associations described in the
data model.
Anomalies, Structural
Dependencies, and Data
Normalization
Database Anomalies
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Normalizing Tables
The database anomalies described
are symptoms of structural
problems within tables called
dependencies.
repeating groups
partial dependencies
transitive dependencies
Linking Normalized
Tables
if 1:1 association, either of tables
primary keys may be foreign key.
if 1:M association, primary key of the
ONE side is embedded as foreign key in
the MANY side.
if M:M (M:N) association, create separate
linking table.
1. Identify Entities
To pass as valid entities, two
conditions need to be met:
1. An entity must consist two or
more occurrences.
2. An entity must contribute at least
one attribute that is not provided
through other entities.
Purchasing system
1. The purchasing agent reviews the inventory status
report for items that need to be reordered.
2. The agent selects a supplier and prepares online
purchase order.
3. The agents prints a copy of the purchase order.
4. The supplier ships inventory to the company. Upon its
arrival, the receiving clerk inspects the inventory and
prepares an online receiving report. The computer
system automatically updates the inventory records.
0,
M:M
Contains
Inventory
Supplies
0,
M:M
M:M
Supplier
Receiving
Report
Sent
to
1: 0,
M
Is
associated
1: 1
with
Purchase
Order
Database in a Distributed
Environment
Centralized Databases
- remote users send requests via
terminals for data to the central site, which
processes the requests and transmits the
data back to the user.
- the central site performs the functions of
file manager that services the data needs of
the remote users.
To Illustrate, consider the computer logic for recording the credit sale of
P2,000 to customer James
INSTRUCTION
AR-Jones
DATABASE VALUES
AR-Control
START
1. Read AR-Sub account (Jones)
1,500
2. Read AR-Control account
10,000
3. Write AR-Sub account (Jones) +2,000
3,500
4. Write AR-Control account +2,000
END
12,000
Data Lockup
- To achieve data currency, simultaneous
access to individual data elements by
multiple sites needs to be prevented
- Software control (usually a function of
the
DBMS)
that
prevents
multiple
simultaneous accesses to data.
Distributed Databases
- It can be distributed using either partitioned or
replicated technique
Partitioned Database
- Splits the central database into segments or
partitions that are distributed to their primary users.
The advantage of this approach are:
1. Storing data at local sites increases users control
2. Permitting local access to data and reducing the
volume of data that must be transmitted between
sites improves transaction processing response
time
3. Reduce the potential for disaster
Replicated Databases
- Effective in companies in which there exists
a high degree of data sharing but no primary
user.
- Data traffic between sites is reduced
considerably
- Supports read-only queries
Concurrency Control
- The presence of complete and accurate
data at all remote sites.
- Systems designers need to employ methods
that transactions processed at each site are
accurately reflected in the databases at all other
Distinguishing features
of Structured and
Relational databases