Table of Contents
Assignment Introduction ............................................................................................................ 4 1. Conceptual Model: Entity- Relationship ............................................................................ 5 Mandatory One to Mandatory Many: .................................................................................... 6 Mandatory Many to Mandatory Many: ................................................................................. 6 Optional Many to Mandatory One: ....................................................................................... 6 2. 3. 4. Entity Relation to the Business Rules................................................................................. 7 Logical Relational Database Design................................................................................... 8 Bridge Management System Microsoft Access............................................................... 9
5.
Table of Figures
Figure 1: Entity - Relationship Diagram .................................................................................... 5 Figure 2: Bridges Table Data .................................................................................................. 9 Figure 3: Bridges Table Field, Data Type & Description ....................................................... 9 Figure 4: Components Table Data ........................................................................................ 10 Figure 5: Components Table Field, Data Type & Description ............................................. 10 Figure 6: Construction Type Table Data .............................................................................. 10 Figure 7: Construction Type Table Field, Data Type & Description ................................... 10 Figure 8: Component Quantity Table Data ............................................................................ 11 Figure 9: Component Quantity Field, Data Type & Description.......................................... 11 Figure 10: Component Condition Levels Data ...................................................................... 11 Figure 11: Component Condition Levels Field, Data Type & Description .......................... 12 Figure 12: Owner Data.......................................................................................................... 12 Figure 13: Owner Field, Data Type & Description .............................................................. 12 Figure 14: Inspector Visit Field, Data Type & Description................................................. 13 Figure 15: Inspector Visit Data ........................................................................................... 13 Figure 16: Inspectors Data .................................................................................................... 13 Figure 17: Inspectors Field, Data Type & Description ........................................................ 14 Figure 18: Interval Change Data ........................................................................................... 14 Figure 19: Interval Change Field, Data Type & Description................................................ 14 Figure 20: Relationship Table .................................................................................................. 15 Figure 21: Query ...................................................................................................................... 17 Figure 22: Run Query .............................................................................................................. 17 Figure 23: Before Query Run .................................................................................................. 17 Figure 24: After Query Run ..................................................................................................... 18
Assignment Introduction
A national transport infrastructure management organisation wishes to develop a bridge management system (BMS). This system should record basic information about the bridges on the transport network, and should also keep track of periodic inspection of each bridge component. This report will provide the information and process on which this bridge management system was created and structured. Microsoft Access was utilised to create this BMS.
Optional One
Mandatory Many Optional Many
0..1
1..* 0..*
Bridges
Inspector Visit
Interval Change
Bridge The bridge table contains information regarding the bridge ID, name and location. The Construction ID and Owner ID were also added to connect a bridge to the correct construction type and owner. It can be seen in Figure 2, that there are five different bridges. Figure 3, shows the field name, data type and description of each attribute in the table.
Components The component table contains information regarding the component ID, name and description. There are five different component types present in the table.
Construction Type The construction type table contains information regarding the construction ID as seen in the bridges table. There are four different construction types present in the table.
Component Quantity The component quantity table represents the components present in a given bridge with their quantity. This table is used to connect the component table with the bridge table. Thus allowing the user to know which components are used on a given bridge, with the bridge construction type and its owner.
Component Conditions The components have to be inspected at certain monthly intervals, the components are graded on a scale of 0 6 as shown in Figure 10. This table shows the scale and their corresponding meaning.
Figure 11: Component Condition Levels Field, Data Type & Description
Owner Each bridge has an owner, as seen in the bridge table. This table contains the information regarding the owner ID .
Inspection Visit Each component must be inspected, the inspection table records the necessary information regarding these visits such as the inspector ID, the bridge in which the component was inspected , what component was inspected, the condition of the component and the date of inspection.
Inspectors The inspector table contains the inspector id and their name.
Interval Change As already stated, the components are inspected at certain monthly intervals; a query was set up as to allow the user to alter this monthly interval. The interval change table contains all the necessary information in one table. The query modification is made to this table, in the inspection interval month column.
Relationship The tables above are inter-linked together by a relationship diagram, the diagram produced is shown in the Figure below. These relationships allow tables to be split up but still link relevant data to each other.
5. Query
A query was created as to allow the user to update the amount of months in which a component should be inspected. The query is guarded as to ensure the inspection months are greater than the minimum months and less than maximum. This query is limited to only increasing the inspection months; however another query was set up as to decrease the inspection months if necessary. The queries names are: Inspection Month Query Increase. Inspection Month Query Decrease.
Procedure: The query has three different inputs that are required the Component ID, Construction ID and Date of Change. These necessary inputs ensure the correct parts are being selected with regard to alteration. The reason behind the selection of the parameters is to ensure the component for a given construction type is being modify and not that component on every construction type. The approach in which to use and alter the query is shown in below. Run Query Double Click Inspection Month Query Increase. Modify Component ID, Construction ID and Date of change Selection: o Right click on the query and select Design Space. Figure 21 shows the query in access, the user will have to alter the component ID, Construction ID and Date of Change field to their requirements, to update the correct information. To run this query, click run on the tool bar as shown in Figure 22. Figure 23 is the before screen shot of the interval change table and Figure 24 is the after screen shot. It can be seen that the data in the interval change column is added/subtracted (depending on query selected) to the data in the inspection interval months column.
Inputs
If the decrease query is ran, straight after the update query the data will return to previous as in figure 23. The SQL for both Queries are shown below:
Increase Query:
UPDATE [Interval Change] SET [Interval Change].[Inspection interval Months] = IIf([Interval Change]![Inspection interval Months]+[Interval Change]![Interval
Month]>=[Interval Change]![Minimum Inspection Months] And [Inspection interval Months]+[Interval Change]![Interval Month]<=[Interval Change]![Maximum Inspection Month],[Interval Change]![Interval Month]+[Interval Change]![Inspection interval
Months],[Interval Change]![Inspection interval Months]) WHERE ((([Interval Change].[Component ID])=3) AND (([Interval Change].[Date of change])=#11/25/2011#) AND (([Interval Change].[Construction ID])=3));
Decrease Query:
UPDATE [Interval Change] SET [Interval Change].[Inspection interval Months] = IIf([Interval Change]![Inspection interval Months]+[Interval Change]![Interval
Month]>=[Interval Change]![Minimum Inspection Months] And [Inspection interval Months]+[Interval Change]![Interval Month]<=[Interval Change]![Maximum Inspection Month], [Interval Change]![Inspection interval Months] - [Interval Change]![Interval Month],[Interval Change]![Inspection interval Months]) WHERE ((([Interval Change].[Component ID])=3) AND (([Interval Change].[Date of change])=#11/25/2011#) AND (([Interval Change].[Construction ID])=3));