18.2. Creating the Database

When you start to create any database, you need to move the physical world tasks and items, in this case the boiler information, over into the electronic world of the database. To be a good backend or data store, the database, must fulfill several business requirements, in this case to answer the following questions:

  1. What boilers are out of the predefined specs?

  2. Which boilers are falling out of spec over and over again?

  3. How often is the boiler falling out of spec?

  4. Which operators are finding the most boilers out of spec?

  5. How is the boiler system behaving as a whole?

  6. How long is it taking the operators to complete the boiler inspections?

  7. Can the InfoPath form expedite data collection?

To answer these questions, a database was created to maintain boiler information. To work with the data in the tables, a plan was created that includes these major tasks:

  • Designing the Database using Microsoft Access to support the InfoPath frontend

  • Designing the XML Web service to deliver the data to the clients

  • Designing the InfoPath document to display or collect data from the Web service

These tasks can be accomplished using a wide array of technologies. For this case study, Access was chosen as the data store for the simple ease of use, without incurring the cost overhead of SQL Server.

The preceding bullet points directly reflect how the solution is broken up into three different logical steps in order to create the best overall solution utilizing the best patterns and practices.

You may find that creating the database first is not where you wanted to jump in. Rest assured that if you start creating an InfoPath form without finely detailed planning, which includes the database, you will run into many problems and your solution will take twice as long to create.

InfoPath was designed to query and populate an existing data store. Unlike working directly in Access, the best practice is to create the complete database first then work on the client side of the application. This will make the InfoPath part of the solution very easy and less time-consuming to create.

18.2.1. The BoilerSystem Data Model

Database modeling and architecture are definitely out of the scope of this book, and there are many books already published covering these two areas extensively.

To keep this case study fairly straightforward, the typical one-to-many type of relationships in the database that will support most real-life situations will be used. If you are interested in more advanced database architecture subjects visit www.wrox.com, and you will see many books on Microsoft Access and/or SQL Server 2000. Following are the tables and fields outlining the BoilerSystem database:

18.2.1.1. BoilersOperatingLog table

The first table created is the table to hold the actual boiler inspection data. During initial analysis and gathering of the business requirements the BoilerOperatingLog table was found to need 12 Fields. The fields are:

Field NameDescription
BoilerLogIDAutonumber field that will uniquely identify each boiler log record.
BoilerIDLook up field to the Boiler table.
LogDateDate the inspection took place.
LogTimeDollar time the log was submitted.
ShiftIDNumber of items included in the order.
OperatorIDLookup field to the Operator table.
SteamDrumStatusStatus of the boilers steam drum.
SteamDrumPSIGStatus of the steam drum PSIG.
ExcessField to hold the excess PSIG data.
SteamLoadSteam load of this particular boiler.
SteamCyclesSteam cycle data goes here.
CommentsAny comments the operator may want to make on this inspection are stored here.

18.2.1.2. SystemLog Table

The SystemLog table will hold the data that is particular to the boiler system as a whole. This will store important information concerning the building and the overall health of the system.

The fields are:

FieldDescription
SystemLogIDAutoNumber field that will uniquely identify each system log record.
SteamHeaderPSIGSteam header PSIG.
SteamFeedWaterHeaderPSIGSteam water PSIG.
DearatorPSIGDearator PSIG.
DearatorTempDearator temperature.
FMACOutsideAirTempFMAC outside air temperature.
BlowDownOnlineBoilersLWCOStatus of the boilers steam drum.
ShiftIDField to hold the excess PSIG data.
LogTimeSteam load of this particular boiler.
OperatorIDSteam cycle data goes here.
CommentsAny comments the operator may want to make on the system inspection are stored here.

18.2.1.3. Lookup Tables

The following tables are considered lookup tables, they hold static data that doesn't really change that often and are there mostly to provide information to fill in combo boxes or to look up data in.

18.2.1.3.1. Boilers

This table will hold the individual boiler information. The fields are:

FieldDescription
BoilerIDAutoNumber field that uniquely identies each boiler.
BoilerNumberBoiler number.
BoilerDescriptionDescription of the boiler.

18.2.1.3.2. Shifts

This table will hold the individual boiler information. The fields are:

FieldsDescription
ShiftIDAutoNumber field that will uniquely identify each shift.
ShiftNameShifts name, used for display purposes.
TimeStartTime the shift starts.
TimeEndTime the shift ends.

18.2.1.3.3. Operators

This table will hold the individual boiler information. The fields are:

FieldDescription
OperatorIDAutoNumber field that will uniquely identify each operator.
OperatorNameBoiler number.
OperatorNumberDescription of the boiler.

18.2.2. The BoilerSystem Relationship Model

When working with more than one table in a database, it is usually more efficient to create one-to-many relationships between the tables. This allows for a more normalized database structure and allows to greater flexibility when creating the Web service and client-side application. Figure 18-2 shows the design of the database with the relationships illustrated:

Figure 18.2. Figure 18-2

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.74.3