bridge management system2
TRANSCRIPT
-
8/2/2019 Bridge Management System2
1/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. Entity Relation to the Business Rules................................................................................. 7
3. Logical Relational Database Design ................................................................................... 8
4. Bridge Management System Microsoft Access............................................................... 9
-
8/2/2019 Bridge Management System2
2/18
5. Query ................................................................................................................................ 16
Increase Query: .................................................................................................................... 18
Decrease Query: ................................................................................................................... 18
-
8/2/2019 Bridge Management System2
3/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 TableData ........................................................................................ 10
Figure 5: Components TableField, 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 TableData ............................................................................ 11
Figure 9: Component QuantityField, Data Type & Description.......................................... 11
Figure 10: Component Condition LevelsData ...................................................................... 11
Figure 11: Component Condition LevelsField, Data Type & Description .......................... 12
Figure 12: OwnerData.......................................................................................................... 12
Figure 13: OwnerField, Data Type & Description .............................................................. 12
Figure 14: Inspector Visit Field, Data Type & Description................................................. 13
Figure 15: Inspector Visit Data ........................................................................................... 13
Figure 16: InspectorsData .................................................................................................... 13
Figure 17: Inspectors
Field, Data Type & Description ........................................................ 14
Figure 18: Interval ChangeData ........................................................................................... 14
Figure 19: Interval ChangeField, 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
-
8/2/2019 Bridge Management System2
4/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.
-
8/2/2019 Bridge Management System2
5/18
1. Conceptual Model:Entity- RelationshipA 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:
Figure 1: Entity - Relationship Diagram
Mandatory One 1..1
Optional One 0..1
Mandatory Many 1..*
Optional Many 0..*
-
8/2/2019 Bridge Management System2
6/18
Mandatory One to Mandatory Many:
Bridge to Owner: A bridge has one mandatory owner, while an owner can own manydifferent bridges.
Construction Type to Bridge: A bridge has one mandatory construction type, while aconstruction type can belong to many different bridges.
Inspector to Inspection Visit: Inspector can perform many inspection visits while aninspection 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 componentcondition
Mandatory Many to Mandatory Many:
Bridge to Component: A bridge can have many different components, and acomponent 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.
-
8/2/2019 Bridge Management System2
7/18
2. Entity Relation to the Business RulesThe 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 tableOwner 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.
-
8/2/2019 Bridge Management System2
8/18
3. Logical Relational Database DesignMicrosoft 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 Data Type
Bridges
Bridge ID Number
Bridge Name Text
Bridge Location Text
Construction ID Number
Owner ID Text
Components
Component ID Auto Number
Component Name Text
Component Description Text
Component Condition LevelsCondition Code Number
Condition State Text
Construction Type
Construction ID Auto Number
Construction Type Text
Construction Description Text
Component Quantity
Component ID Number
Bridge ID Number
Quantity Text
Owner
Owner ID Number
Owner Name Text
Owner Address Text
InspectorsInspector ID Auto Number
Inspector Name Text
Inspector Visit
Inspector ID Number
Bridge ID Text
Condition Code Number
Component ID Number
Inspection Date Text
Interval Change
Change Interval ID Text
Interval Month Text
Construction ID Number
Component ID Number
Date of Change Date/Time
Maximum Inspection Month Number
Minimum Inspection Months Number
Inspection interval Months Number
-
8/2/2019 Bridge Management System2
9/18
4. Bridge Management SystemMicrosoft AccessThe 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 TableData
Figure 3: Bridges TableField, Data Type & Description
-
8/2/2019 Bridge Management System2
10/18
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 TableData
Figure 5: Components TableField, 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 TableData
Figure 7: Construction Type TableField, Data Type & Description
-
8/2/2019 Bridge Management System2
11/18
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
-
8/2/2019 Bridge Management System2
12/18
Figure 11: Component Condition LevelsField, 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: OwnerData
Figure 13: OwnerField, Data Type & Description
-
8/2/2019 Bridge Management System2
13/18
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 VisitField, Data Type & Description
Figure 15: Inspector Visit Data
Inspectors
The inspector table contains the inspector id and their name.
Figure 16: InspectorsData
-
8/2/2019 Bridge Management System2
14/18
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 ChangeData
Figure 19: Interval ChangeField, Data Type & Description
-
8/2/2019 Bridge Management System2
15/18
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
-
8/2/2019 Bridge Management System2
16/18
5. QueryA 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 QueryDouble Click Inspection Month Query Increase. Modify Component ID, Construction ID and Date of change Selection:
oRight 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.
-
8/2/2019 Bridge Management System2
17/18
Figure 21: Query
Figure 22: Run Query
Figure 23: Before Query Run
Inputs
-
8/2/2019 Bridge Management System2
18/18
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]![Minimum Inspection Months] And [Inspection interval
Months]+[Interval Change]![Interval Month]