3. DATABASE DESIGN STRATEGIES
Database design strategy approaches
is being done during database design of
Database Life Cycle (Phase 2).
The main data source of database
design strategies is the Business Rules.
It follows the rules in creating entity
relationship diagram.
4. Case Study
The secretary and treasurer of Barangay
Atate, Palayan City, were experiencing difficulties
in generating list of issued certificate and
collection report from their manual logbook to be
presented during their weekly and monthly
sessions. The Barangay Officials then asked the
XYZ Team to develop a Barangay Issuing
Certification System to solve the problem and
will also serve as check and balance tool for their
transactions.
If we are the XYZ Team, how do we
apply the different DB Design Strategies?
5. Case Study Business Rules
1. Only authorized Barangay officials can access the system.
2. Any registered citizen (client) of the Barangay can request for any
certification (Brgy Certificate, Indigency Certificate, Business Certificate).
3. The client is required to provide his/her personal information.
4. The Barangay Secretary will input the personal information
of the client and requested documents in the system.
5. The client must pay the requested certificate fee
(If applicable (optional), Indigency Certificate – No Fee).
6. The Barangay Treasurer will process the payment (If applicable)
7. The Barangay Secretary will print the requested document(s).
8. The client must affix their signature and thumb mark on the
requested document(s).
9. The Barangay Captain will sign the requested certificate.
10. The Barangay Secretary will issue the requested certificate to client.
11. The Barangay Secretary will print daily, weekly and monthly reports
including list of issued certificate and amount collected that will be
certified by Barangay Treasurer and noted by Barangay Captain.
6. This process involves the 1.)identification of
different entity types and 2.)the definition of each
entity’s attributes.
Every entity type should be important in its own right within the problem domain.
TOP-DOWN DESIGN
ENTITY 1 ENTITY 2 ENTITY n
CONCEPTUAL MODEL
attribute 1
attribute 2
attribute 3
attribute n
attribute 1
attribute 2
attribute 3
attribute n
attribute 1
attribute 2
attribute 3
attribute n
PROCESS 1
PROCESS 2
7. Identify entities from the business rules statements.
TOP-DOWN DESIGN
CASE STUDY: Barangay Issuing Certification System
1. Only authorized Barangay officials can access the system.
2. Any registered citizen of the Barangay can request for any
certification (Brgy Certificate, Indigency Certificate, etc).
3. The client is required to provide his/her personal
information.
4. The Barangay Secretary will input the personal
information of the client and requested documents in the
system.
5. The client must pay the requested certificate fee.
6. The Barangay Treasurer will process the payment
7. The Barangay Secretary will print the requested document(s).
8. The client must affix their signature and thumb mark on the
requested document(s).
9. The Barangay Captain will sign the requested certificate.
10. The Barangay Secretary will issue the requested certificate to client.
SYSTEM
USER
ENTITY
CERTIFICATE
CLIENT
TRANSACTION
COLLECTION
8. Define attributes for each entity
TOP-DOWN DESIGN
SYSTEM
USER
CERTIFICATE
CLIENT TRANSACTION
COLLECTION
User ID INT(11) (PK)
Account Name VARCHAR(128)
User Name VARCHAR(64)
Password VARCHAR(128)
Encrypted
Active Status TINYINT(1)
Position VARCHAR(56)
Certificate ID INT(11) (PK)
(PK)
Certificate Name VARCHAR(128)
(PK)
Certificate content LONGBLOB
Price DOUBLE
Account ID INT(11) (PK)
Account Name VARCHAR(255)
Addr. Street VARCHAR(255)
Birthdate DATE
Gender CHAR(1)
Civil Status CHAR(18)
Input By INT (11)
TransactionID BIGINT(19) (PK)
Account ID INT(11)
Collection ID BIGINT(19)
Transaction date DATETIME
Certificate ID INT(11)
Input By INT (11)
Certificate ID INT(11)
Account ID INT(11)
OR Number BIGINT(19)
Amount DOUBLE
Collection ID BIGINT(19) (PK)
9. Layout the Conceptual Model
TOP-DOWN DESIGN
CASE STUDY: Barangay Issuing Certification System
SYSTEM
USER
CERTIFICATE CLIENT TRANSACTION COLLECTION
userid (PK)
acc_name
username
user_password
activestatus
position
certificateid(PK)
(PK)
certificate_name
(PK)
cert_content
price
account_id
(PK)
acc_name
addr_street
birthdate
gender
civil_status
userid
trans_id (PK)
account_id
collectionid
transactiondate
certificateid
userid
certificateid
(PK)
account_id
or_number
amount
collectionid (PK)
Each entity type becomes a database table.
Entity attributes become its field/column.
CONCEPTUAL MODEL
10. OUTPUT: Data Dictionary
Field Type Size Description
accid int 11 Primary Key; System User Account ID#
acc_name varchar 64 Account Name
username varchar 128 Username
user_password varchar 255 Password
activestatus tinyint 1 1 value if user is active, 0 if inactive
position varchar 56 System user position
tblusers
12. This process involves 1.)defining attributes
and then 2.)groups them to form an entity.
BOTTOM-UP DESIGN
ENTITY 1 ENTITY 2 ENTITY n
CONCEPTUAL MODEL
attribute 1
attribute 2
attribute 3
attribute n
attribute 1
attribute 2
attribute 3
attribute n
attribute 1
attribute 2
attribute 3
attribute n
PROCESS 1
PROCESS 2
13. Define attributes from the
business rules statements.
BOTTOM-UP DESIGN
CASE STUDY: Barangay Issuing Certification System
1. Only authorized Barangay officials can
access the system.
2. Any registered citizen of the Barangay can
request for any certification
(Brgy Certificate, Indigency Certificate, etc).
Attributes
User ID
Official Name
Username
Password
Is Active?
Position
Certificate ID
(PK)
Certificate name
(PK)
Content
Fee / price
Input by
14. Define attributes from the
business rules statements.
BOTTOM-UP DESIGN
CASE STUDY: Barangay Issuing Certification System
3. The client is required to provide his/her
personal information.
4. The Barangay Secretary will input the
personal information of the client and
requested documents in the system.
Attributes
Account ID
Client Name
Address St.
Birth date
Gender
Civil status
Transaction ID
Account ID
Transaction date
Certificate ID
Input By
Input By
Collection ID
15. Define attributes from the
business rules statements.
BOTTOM-UP DESIGN
CASE STUDY: Barangay Issuing Certification System
5. The client must pay the requested
certificate fee
6. The Barangay Treasurer will process
the payment
7. The Barangay Secretary will print the requested
document(s).
8. The client must affix their signature and thumb mark on
the requested document(s).
9. The Barangay Captain will sign the requested certificate.
10. The Barangay Secretary will issue the requested
certificate to client.
Attributes
Certificate ID
(PK)
Client ID
OR Number
Amount
Collection ID
Input by
16. Group the attributes to form an entity
BOTTOM-UP DESIGN
CASE STUDY: Barangay Issuing Certification System
SYSTEM
USER
CERTIFICATE CLIENT TRANSACTION COLLECTION
Each entity type becomes a database table.
Entity attributes become its field/column.
User ID
Official Name
Username
Password
Is Active?
Position
Certificate ID
(PK)
Certificate name
(PK)
Content
Fee / price
Input by
Account ID
Client Name
Address St.
Birth date
Gender
Civil status
Input By
Transaction ID
Account ID
Transaction date
Certificate ID
Collection ID
Input By
Certificate ID
(PK)
Client ID
OR Number
Amount
Collection ID
Input by
CONCEPTUAL MODEL
17. Refining Attributes
BOTTOM-UP DESIGN
CASE STUDY: Barangay Issuing Certification System
SYSTEM
USER
CERTIFICATE CLIENT TRANSACTION COLLECTION
userid (PK)
acc_name
username
user_password
activestatus
position
certificateid(PK)
(PK)
certificate_name
(PK)
cert_content
price
account_id
(PK)
acc_name
addr_street
birthdate
gender
civil_status
userid
trans_id (PK)
account_id
collectionid
transactiondate
certificateid
userid
certificateid
(PK)
account_id
or_number
amount
collectionid (PK)
Format attributes into table field format
Assign a Primary Key
CONCEPTUAL MODEL
18. CENTRALIZED DESIGN
Suitable for small project.
Change in the control structure is very easy.
One control object or subsystem ("spider") controls
everything.
19. Define attributes and form an entity from draft GUI
based on business rules statement(s).
CENTRALIZED DESIGN
CASE STUDY: Barangay Issuing Certification System
1. Only authorized Barangay officials can access the system.
Attributes
User ID
Official Name
Username
Password
Is Active?
Position
SYSTEM
USER
Entity
20. Define attributes and form an entity from draft GUI
based on business rules statement(s).
CENTRALIZED DESIGN
CASE STUDY: Barangay Issuing Certification System
2. Any registered citizen of the Barangay can request for any
certification (Brgy Certificate, Indigency Certificate, etc).
Attributes
Certificate ID
(PK)
Certificate name
Input by
CERTIFICATE
Rate/Price
21. Define attributes and form an entity from draft GUI
based on business rules statement(s).
CENTRALIZED DESIGN
CASE STUDY: Barangay Issuing Certification System
2. Any registered citizen of the Barangay can request for any
certification (Brgy Certificate, Indigency Certificate, etc).
Attributes
Certificate name
(PK)
Content
CERTIFICATE
22. Define attributes and form an entity from draft
GUI based on business rules statement(s).
CENTRALIZED DESIGN
CASE STUDY: Barangay Issuing Certification System
3. The client is required to provide his/her personal information.
4. The Barangay Secretary will input the personal information of the
client and requested documents in the system.
Attributes
Account ID
Client Name
Address St.
Birth date
Gender
Civil status
Input By
CLIENT
Attributes
Transaction ID
Account ID
Transaction date
Certificate ID
Input By
Collection ID
TRANSACTION
23. Define attributes and form an entity from draft GUI
based on business rules statement(s).
CENTRALIZED DESIGN
CASE STUDY: Barangay Issuing Certification System
5. The client must pay the requested certificate fee.
6. The Barangay Treasurer will process the payment.
Attributes
Certificate ID
(PK)
Client ID
OR Number
Amount
Collection ID
Input by
COLLECTION
24. Finalize the entities and their attributes
CENTRALIZED DESIGN
CASE STUDY: Barangay Issuing Certification System
Each entity type becomes a database table.
Entity attributes become its field/column.
SYSTEM
USER
CERTIFICATE CLIENT TRANSACTION COLLECTION
userid (PK)
acc_name
username
user_password
activestatus
position
certificateid(PK)
(PK)
certificate_name
(PK)
cert_content
price
account_id
(PK)
acc_name
addr_street
birthdate
gender
civil_status
userid
trans_id (PK)
account_id
collectionid
transactiondate
certificateid
userid
certificateid
(PK)
account_id
or_number
amount
collectionid (PK)
CONCEPTUAL MODEL
25. DECENTRALIZED DESIGN
Control is distributed.
Spreads out responsibility.
Suitable for large and complex projects.
Define project modules and assign to different group.
Each design group creates a conceptual data model
corresponding to the subset being modeled.
Each design group can use either Top-down, Bottom-up
or centralized as sub-design to create a conceptual data
model.
27. Define project modules
DECENTRALIZED DESIGN
SYSTEM
USER
CLIENT TRANSACTION COLLECTION
User ID
Official Name
Username
Password
Is Active?
Position
CERTIFICATE
Certificate ID
(PK)
Certificate name
(PK)
Content
Fee / price
Input by
Account ID
Client Name
Address St.
Birth date
Gender
Civil status
Input By
Transaction ID
Account ID
Transaction date
Certificate ID
Collection ID
Input By
Certificate ID
(PK)
Client ID
OR Number
Amount
Collection ID
Input by
ACCOUNTS FORM SETUP ISSUANCE PAYMENT
Barangay Issuing
Certification System
AGGREGATION
CONCEPTUAL MODEL
31. OUTPUT: Data Dictionary
Field Type Size Description
accid int 11 Primary Key; System User Account ID#
acc_name varchar 64 Account Name
username varchar 128 Username
user_password varchar 255 Password
activestatus tinyint 1 1 value if user is active, 0 if inactive
position varchar 56 System user position
tblusers