Professional Documents
Culture Documents
Training
for PhilCAFE Partners
Name
l l o ! Organization
He
Role/Position
Expectation
House Rules
Be on time.
Use phones only when necessary.
Actively participate.
Only use apps in your laptop that are relevant
for the training.
Don’t leave training venue until the session for
the day is done.
Observe proper COVID-19 health protocols.
Day
Rationale
Rationale
Requested capacity building on database creation
and administration.
Tables
Record
A row in a table
Field
A column in a table
Database Database terms to know…
Basics
Queries
Forms
Reports
Correctness and
Duplicate information completeness of
is bad information is
important
Products
Database The design process
Basics Middle name
Last name
First name
Find and organize
the information
required
Member
name:_______________________
Address:
__________________________
Age:
_______________________________
Products: Province
Birthdate 1.
___________________________ Municipality
2.
___________________________
Barangay
3.
___________________________
Street address
Product
name
Database The design process
Basics
Date
Find and organize
the information Date:_________
required __
Product Customer Qty Unit Price Total
name
Product name
Total sales
Customer
Unit price
Quantity
Database The design process
Basics
Find and organize
the information
required
• Number produced
• Salutation (Mr) • Inventory
• Years of membership
Database The design process
Basics
MEMBERS PRODUCTS
Divide the CUSTOMERS
• Last name • Product name
• Customer name
information into • First name • Unit Price
tables • Province, Municipality,
Barangay, Street address
• Birthdate SALES
• Product name
• Product name
• Customer
• Salutation (Mr)
• Date of sale
• Years of membership/Date of
• Quantity
membership
• Unit Price
• Total Cost
GEOGRAPHY
• Province INVENTORY
• Municipality • Product name
• Barangay • Number produced
• Inventory (units in stock)
Database The design process
Basics
Divide the • Do not place all information into a single table
information into
tables • If you tend to repeat information in more than one place, try to
place this repeating information as a separate table and just link
that table to your existing one.
Types of relationships
• One-to-one
• One-to-many
• Many-to-many
Database The design process
Basics
One-to-one (1:1)
Set up the table • Each record in the first table can have only one matching record in the second table, and
relationships each record in the second table can have only one matching record in the first table.
• You might use this relationship to divide a table with many fields, to isolate part of a table
for security reasons, or to store information that applies only to a subset of the main table.
• Rarely appears in a database; usually a supplemental information in a table; can eventually
change to one-to-many over time
• Example: Farms and Farm Owners Table
each farm corresponds to one record in farm owners table
Take note if there are things that needs to be added or omitted to avoid
duplication
Database
Basics
-e.g. you can’t have a field coffee products where you can place
more than one type of coffee product.
Coffee Farmer Date Quarter Volume (kg) Coffee Product Farmer Date Quarter Volume
Product Name Name (kg)
Arabica GCB Juan Feb 15, 2023 Q1 500 Arabica GCB Juan Feb 15, 2023 Q1 500
Robusta GCB Gabriela Apr 17, 2023 Q2 356 Robusta GCB Gabriela Apr 17, 2023 Q2 356
Arabica GCB Andres June 19, 2023 Q3 532
Arabica GCB, Andres June 19, 2023 Q3 532, 612
Robusta GCB Robusta GCB Andres June 19, 2023 Q3 612
Database The design process
Basics
Apply
normalization
Second Normal Form (2NF)
rules - must satisfy 1NF
- each non-key column is fully dependent on the entire primary
key, not on just part of the key (if composite key)
- Each table must contain about only one type of thing
Coffee Product Farmer Date Quarter Volume
Name (kg) - e.g. the table on the left violates 2NF
Arabica GCB Juan Feb 15, 2023 Q1 500 because the date and volume columns are
Robusta GCB Gabriela Apr 17, 2023 Q2 356
dependent on a combination of the Coffee
Product and Farmer Name.
Arabica GCB Andres June 19, 2023 Q3 532
Robusta GCB Andres June 19, 2023 Q3 612
Database The design process
Basics
Apply
normalization
Second Normal Form (2NF)
rules - solution: create 2 tables that contains coffee products and farmer details, link
these together in a 3rd table we will call “consolidation details” with coffee product ID
and farmer ID forming the composite primary key