Showing posts with label DB Design. Show all posts
Showing posts with label DB Design. Show all posts


Transforming forms to table design is not really difficult if you will follow a set of structured steps without doing immediate shortcuts. For me to illustrate that process, let us have this sample form shown left.

Any business form will have the following parts - Header data, body, footer. Identifying these parts of the form will allow you to create a skeleton table design which you will adjust later. As a rule to follow, header and footer data are all in one table called the parent table, and the data in the body is in another table called the child table.

Investigating our sample form, what are the data in the form that forms the header, footer and the body? You can seek the assistance of the company to help you identify these parts if you are not accustomed to it yet.


It would help if you underline the data items with red (header and footer) or blue (body). Before we design the tables, each form is unique and there is a particular data that identifies a form (this is typically the form #). This identifier help us identify one form from another. In our example, we can obviously identify the Purchase Order # as our form identifier.

The image on the left shows the same form marked with the footer and header data (in red) and the body data (in blue).

What's next?
After identifying header and footer data, and body data, we can directly do a draft table design from this following the basic rule we have stated above (parent and child table). See the image below.



If you have noticed, the primary key of the parent table (PURCHASE ORDER) is the identifier we decided for the form early on. The primary key of the child table (PURCHASE ORDER DETAILS) is the combined identifier of the form and the identifier for each of the records in the body (which in our sample is obviously the item#).

At this point, you have a draft table design. You are ready to go for design refinements through normalization and other splitting the table methods. To refer to the possible situations that will signal us that splitting tables are necessary, check this blog post.

Databases store data about what happened in a transaction (or any event) that happened in an organization. A form is a reflection that such transaction (or event) actually happened. The data in the form may not necessarily be complete. There are important data in most of the forms used that are not recorded but are important to completely record what happened in the transaction. What can we use as a guide to what's the minimum amount of information to capture and store in the database?
  1. What is the transaction?
  2. Who did the transaction? Who were the people involved in the transaction?
  3. When did the transaction happen? When was it completed? When was it started?
  4. Where did the transaction happen?
  5. What were done in the transaction?
  6. How was the transaction done (phone, email, form), should other forms of transacting exists.
Groups who cannot show me the reports in which these data to be recorded will be used, only signals that they have not done thorough data requirements analysis, and the design of the database is no convincingly complete. It is also through simulated forms that are incomplete and lacks the vital details to record the transaction that we can tell whether the group is doing the database project well or not.


We know that we can dissect a table into parts (creating new tables). But this is done with a solid set of reason. What may these valid reasons be?
  1. We wanted to optimize spaces by separating fields that a less commonly field up to those that are always filled-up. This is specially if these fields less commonly field up are many.
  2. We notice fields that are only applicable to a specific set of records, and there are other fields that are only applicable to other set of records. In this, we can create a separate table containing the applicable fields for one set of records and another table for the fields applicable to another set of records. This is called specialization/generalization
  3. We wanted to reduce redundancy. This is called normalization
  4. We wanted a field to have a controlled value set. This is called mechanisms for domain constraints.
  5. A field is a multi-valued field, and each multi-valued data is atomically important to affect other possible records. This is called data flattening.
See book: Database Systems (Connoly and Begg), Chapter 3


What is the relationship of data flows with Databases?
To understand this relationship, let us examine what data flows really are first.

A data flow has three components:
  1. the data that is transfered from one process to another
  2. what process did this data come from?
  3. to what process will use this data.
These components tell us that organizational processes is about using data and exchanging information across functions and units of the organization. As an information systems student, this is a critical part of the analysis activity you perform to determine the problems and identify the solution.

When data flowed from source to destination, this is a transactional event. As a transactional event, data is recorded to ensure that the transaction is not lost or completely forgotten. For a system that will able to improve the flow of information in an organization, the first to ensure is that the data about transactions are completely and accurately recorded This tells us that when we do analysis in the objective of developing Information Systems, we also perform transactional analysis. Transactional analysis means to dissect the elements of the transaction and evaluate whether the pre-requisite complete capture is present - Are the data needed to generate the information that should flow to destination complete?

Important elements of a transaction is something that we already learned in our early years - WWWWH (Who, What, Where, When, How).
  1. What is the transaction?
  2. Who transacted it?
  3. How was it transacted?
  4. When did it happen?
  5. Where did it happen?
  6. What exactly was transacted?
  7. What completed the transaction?
  8. Who completed it?
  9. When was it completed?
  10. How was it completed?
This discussion actually leads us to the role of Databases in Data Flows. Since Data Flows contains data about the transaction, such is important to be recorded in Databases.