Anda di halaman 1dari 18

Bridge Management System

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.

Query ................................................................................................................................ 16 Increase Query: .................................................................................................................... 18 Decrease Query: ................................................................................................................... 18

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.

1. Conceptual Model: Entity- Relationship


A conceptual model in the form of entity relationship was created using word. Figure 1 show the entity relationship generated with the cardinality between each entity. The associative entities are shown in the diagram with a dash box. The cardinality of relationships: Mandatory One 1..1

Optional One
Mandatory Many Optional Many

0..1
1..* 0..*

Figure 1: Entity - Relationship Diagram

Mandatory One to Mandatory Many:


Bridge to Owner: A bridge has one mandatory owner, while an owner can own many different bridges. Construction Type to Bridge: A bridge has one mandatory construction type, while a construction type can belong to many different bridges. Inspector to Inspection Visit: Inspector can perform many inspection visits while an inspection visit can only be performed by one inspector. It is mandatory to have inspection visit and for each to have an inspector. Inspection to Component Condition: Each inspection visit must apply component condition

Mandatory Many to Mandatory Many:


Bridge to Component: A bridge can have many different components, and a component can belong to many different bridges. As this is a many to many relationship an associative entity is created called Component Quantity.

Optional Many to Mandatory One:


Component to Interval changes & Construction Type to Interval changes are optional, an interval change is conducted on a component of a certain construction type.

2. Entity Relation to the Business Rules


The entities present in the entity relationship diagram were determined from the business rules provided in the assignment. The bridges entity represents the bridge ID , name and address of the bridge. A bridge can be of one construction type, thus a construction type table has been created which contains the information regarding construction types. I.e. Construction Type ID, Name and description. As suggested by the business rules given in the assignment. In the business rules the bridge can only has one owner, and the owner information is stored in the owner table Owner ID, Name and Address. The component table represents the component ID, component name and description. A bridge can have many different components with a certain quantity; this information is linked together by the component quantity table. The component in certain Bridges/Construction types has to be inspected at certain time line by an inspector. The inspector entity contains the inspector ID and name which connects to the inspection visit entity, this entity records the date of inspection and component condition code. The component condition code entity lists the code and its corresponding meaning. The interval change table is used to update the inspection interval month using an update query, dependent on certain conditions.

3. Logical Relational Database Design


Microsoft Access was used to create the bridge management system (BMS). The BMS tables, attributes and data type are shown below. The primary key can be seen in blue, foreign key in green and when two attributes are highlighted in blue it represents a composite key.
Table Name Attributes Bridge ID Bridge Name Bridge Location Construction ID Owner ID Component ID Components Component Name Component Description Component Condition Levels Condition Code Condition State Construction ID Construction Type Construction Type Construction Description Component ID Component Quantity Bridge ID Quantity Owner ID Owner Owner Name Owner Address Inspectors Inspector ID Inspector Name Inspector ID Bridge ID Condition Code Component ID Inspection Date Change Interval ID Interval Month Construction ID Component ID Date of Change Maximum Inspection Month Minimum Inspection Months Inspection interval Months Data Type Number Text Text Number Text Auto Number Text Text Number Text Auto Number Text Text Number Number Text Number Text Text Auto Number Text Number Text Number Number Text Text Text Number Number Date/Time Number Number Number

Bridges

Inspector Visit

Interval Change

4. Bridge Management System Microsoft Access


The implementation of the relational database management system was done through Microsoft Access. The entities relational diagram was used to create tables in Microsoft Access, screen shot of each table created are shown below, with the table data, the field name, data type and description.

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.

Figure 2: Bridges Table Data

Figure 3: Bridges Table Field, Data Type & Description

Components The component table contains information regarding the component ID, name and description. There are five different component types present in the table.

Figure 4: Components Table Data

Figure 5: Components Table Field, Data Type & Description

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.

Figure 6: Construction Type Table Data

Figure 7: Construction Type Table Field, Data Type & Description

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.

Figure 8: Component Quantity Table Data

Figure 9: Component Quantity Field, Data Type & Description

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 10: Component Condition Levels Data

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 .

Figure 12: Owner Data

Figure 13: Owner Field, Data Type & Description

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.

Figure 14: Inspector Visit Field, Data Type & Description

Figure 15: Inspector Visit Data

Inspectors The inspector table contains the inspector id and their name.

Figure 16: Inspectors Data

Figure 17: Inspectors Field, Data Type & Description

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.

Figure 18: Interval Change Data

Figure 19: Interval Change Field, Data Type & Description

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.

Figure 20: Relationship Table

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

Figure 21: Query

Figure 22: Run Query

Figure 23: Before Query Run

Figure 24: After Query Run

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));

Anda mungkin juga menyukai