Download presentation
Presentation is loading. Please wait.
Published byArthur Ward Modified over 8 years ago
1
TU Dresden - Institut für Bauinformatik Folie-Nr.: 1 TU Dresden - Institut für Bauinformatik BIWO-04 Software Engineering (Software Systems) 4. Exercise EXPRESS-G „MS Access“ Introduction
2
TU Dresden - Institut für Bauinformatik Please develop an object orientated model using EXPRESS-G to describe the following aspects: A Room is a SpatialStructureComponent defined by 2 Slabs and at least 4 Walls. Thereby, a Slab encloses more than 1 Room and a Wall is associated to 1 or 2 Rooms. Rooms have a certain volume and a certain ID-number (inherited from their super class). Slabs and Walls are BuildingElements further described by a Material. The Material identified by an ID-number inform about the material type. Furthermore, Material can include Information about the E-Modul. The class Element comprises the class BuildingElement and the class FeatureElement. Each Element has an ID-number, a length, a width, a height and certain coordinates. Here, global or local coordinates(x,y,z) are selectable. The class FeatureElement is the generalization of the class Openings, which is specialized by the classes DoorOpenings and WindowOpenings. Walls can have up to 4 Openings. Example 3
3
TU Dresden - Institut für Bauinformatik Folie-Nr.: 3 A Room is a SpatialStructureComponent defined by 2 Slabs and at least 4 Walls. Thereby, a Slab encloses more than 1 Room and a Wall is associated to 1 or 2 Rooms. Rooms have a certain volume and a certain ID-number (inherited from their super class). Example 3
4
TU Dresden - Institut für Bauinformatik Folie-Nr.: 4 Slabs and Walls are BuildingElements further described by a Material. The Material identified by an ID-number inform about the material type. Furthermore, Material can include Information about the E-Modul. Example 3 String
5
TU Dresden - Institut für Bauinformatik Folie-Nr.: 5 The class Element comprises the class BuildingElement and the class FeatureElement. Each Element has an ID-number, a length, a width, a height and certain coordinates. Here, global or local coordinates(x,y,z) are selectable. Example 3 String
6
TU Dresden - Institut für Bauinformatik Folie-Nr.: 6 The class FeatureElement is the generalization of the class Openings, which is specialized by the classes DoorOpenings and WindowOpenings. Walls can have up to 4 Openings. Example 3
7
TU Dresden - Institut für Bauinformatik Folie-Nr.: 7 Example 3 String
8
TU Dresden - Institut für Bauinformatik Folie-Nr.: 8 Connect the given Classes by using the following relations: Inheritance-relationships Attribute-relationships InConstructionPhaseUsedFor requiresForConcretePouring hasParts requiresInConstructionPhase isPartOf asMachineUsedFor BuildingHeight Add the cardinalities Example 4
9
TU Dresden - Institut für Bauinformatik Folie-Nr.: 9 Example 4
10
TU Dresden - Institut für Bauinformatik Folie-Nr.: 10 Microsoft Access is a Database Management System (DBMS) for the management of data in a database and for the development of database applications. MS Access supports the relational data model. An Access-database consists of several objects: 1. Tables: The basic objects of a relational DB; storage of data 2. Queries: Utilization of data from one or more tables. 3. Forms: Input and editing of tables and queries data 4. Reports: data summary from tables or queries, clear illustration General
11
TU Dresden - Institut für Bauinformatik Folie-Nr.: 11 Relational database The data in a relational database will be stored in tables. The tables are linked to each other using relations. This enables to combine the data from different tables using queries. Each row (tuple) in a table is a data record. Each tuple consists of a set of attribute values. Each attribute type build a column in the table. The design and the management of a database are carried out using a DBMS (such like MS ACCESS)
12
TU Dresden - Institut für Bauinformatik Folie-Nr.: 12 The relations between the tables are created using KEYS: The primary key of a table, is a unique field within the table. No another data record in its column has the same value. This uniqueness helps to differentiate a data record from other data records in the same table. The Foreign key represents the value of a primary key from a linked table. 1 n primary key Foreign key 1:1-relation 1:n-relation m:n-relation Relational database - relations borrowed by 10 12 Hans
13
TU Dresden - Institut für Bauinformatik Folie-Nr.: 13 Entity / Relationship model (E/R model) EXPRESS-G model Integer String No name surname construction vehicle – driver Class Attribute Nonamesurname Table: construction vehicle driver Each row (data record) is a class instance (object) Each table represents a class Each column in the table represents the values of an attribute. EXPRESS-G model (object-oriented model) DB design Transformation
14
TU Dresden - Institut für Bauinformatik Folie-Nr.: 14 Integer String No Name surname construction vehicle Integer String Integer V-No name type Manufacture year operates S[1:?] Nonamesurname V-NOnametype Manufacture year driver 351 123 1 n 351 123 351 Table: construction vehicle Table: construction vehicle- driver Example construction vehicle – driver
15
TU Dresden - Institut für Bauinformatik Folie-Nr.: 15 Example.. V-NOnameType Manufacture year 1Truck- mounted crane ADK 601999 2ExcavatorBG 722003 3DumperKF-362002 4LorryRX-202005 5LorryBR 72000 6BulldozerPL 20/401998 7Tower craneTK 2602005 Nosurnamename 12543BayerAndreas 12713BergerSven 13151MüllerFelix 12432AhrendGerd 13009MüllerPaul Table: construction vehicle Table: construction vehicle- driver Task 1: Create the table „construction vehicle- driver “ and the table „ construction vehicle “ in the design view of MS ACCESS Click table (Create tab, Tables group) Define columns in the design view (Start tab, views group) Task 2: Insert the values from the both tables using the data sheet view of MS ACCESS Change view to data sheet view (Start tab, views group) Insert values
16
TU Dresden - Institut für Bauinformatik Folie-Nr.: 16 Example….. Task 5: Query the number of all drivers Click the Totals icon(Design tab, Show/Hide group) and select the “Count”-function Task 6: Create a query that shows all the construction vehicles which can be operated by the driver „Müller“ Select the „construction vehicle“ and the „construction vehicle-driver“ table from the dialog box to add and use both tables for the query; enter „‘Müller‘“ in the criteria field of the Surname V-NODriver 112713 213009 312432 412543 5 613009 713151 Task 3: Create an (1-n) relation between both tables (a driver can operate several construction vehicles). Select the datasheet view of the construction vehicle table Click „Add Existing Fields“ (Datasheet tab, Fields&Columns group) Drag the field to be added from the field list pane to the open table Follow the instructions of the Lookup Wizard Task 4: Retrieve all construction vehicles that have a Manufacture year >= 2000 Click Query Design (Create tab, Other group) Select the construction vehicle table from the dialog box to add and use this table for the query Add the table fields („Manufacture year“ is obligatory) Follow the instructions of the Lookup Wizard Enter „>=2000“ in the criteria field of the Manufacture year Click the Run icon (Design tab, results) Retrieve all construction vehicles that have a Manufacture year < 2000 Retrieve all construction vehicles that have a Manufacture year that is between two given values. Use “[parameter]” for parameter input and the “and” operator for connecting conditions
17
TU Dresden - Institut für Bauinformatik Folie-Nr.: 17 Pro NoProject Name Construction volume 1Residential community200000 2City mansion 450000 3Shopping center3400000 4wastewater treatment plant150000 5High-rise building3500000 6Waste-to-energy plant2400000 Create the table „ Construction Project“in the design view of MS ACCESS and Insert the values using the data sheet view of MS ACCESS. Task 7: Query the number of construction projects. Task 8: Calculate the total volume of all construction projects. Task 9: Update the table Construction Project (rename the Waste-to-energy plant as Waste-fueled Power Station) Task 10: Retrieve the maximum and the minimum construction volume Task 11: Increase the construction volume 10% for all the projects Click Update Query icon(Design tab, Query type) Enter „[Construction Project].[Construction volume]*1,1“ in the criteria field of Construction volume Task 12: Increase the construction volume 5% for all the projects that have a constrution volume more than 2000000 Example……. Table: Construction Project
18
TU Dresden - Institut für Bauinformatik Folie-Nr.: 18 Data types in MS ACCESS numeric data types
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.