Chapter 5: Creating Airlines Reservation Application


Using Microsoft Visio you can easily design and document logical database schemas for relational and object-relational databases. Visio enables you to create the Object Role Modeling (ORM) source model for an application, using which you can generate the logical database schema. You can use the logical database schema to create physical database schemas in the form of an SQL DDL file. The SQL DDL file provides the SQL script to create the database.

This chapter explains how to use an ORM source model and the corresponding database model diagrams that create physical database schemas to create an airlines database. The Airlines Reservation application implements the airlines database and reserve seats for travelers.

Architecture of the Airlines Reservation Application

The Airlines Reservation application consists of an AirlinesReservation project that enables an end user to add and delete airlines and aircrafts to the application, and reserve seats for travelers.

Figure 5-1 shows the architecture of the Airlines Reservation application:

click to expand: this figure shows the interaction between different components of the airlines reservation application, such as the orm diagram, the database model diagram, an sql ddl file, the airlines database, and the airlinesreservation .net project.
Figure 5-1: The Airlines Reservation Application Architecture

ORMModeling.vsd file defines the ORM source model for the Airlines Reservation application. The ORMModeling.vsd file defines the Airlines, Aircrafts, Travelers, and Seats entities, roles of these entities, relationships between these entities, and the business rules to which these entities conform.

Figure 5-2 shows the ORM source model, which the ORMModeling.vsd file defines:

click to expand: this figure shows the orm model diagram that displays the entities in the airlines reservation system, their roles, relationships, and business rules.
Figure 5-2: The ORM Source Model

The DBModeling.vsd file defines the database model diagram for the ORM source model defined in the ORMModeling.vsd file. You can generate the DBModeling.vsd file from the ORMModeling.vsd file using Visio. The DBModeling.vsd file displays the conceptual design of the ORM source model in the form of tables and the relationships between these tables. The entities in the ORM source model map to the tables and the business rules map to the constraints in the database model diagram.

Figure 5-3 shows the database model diagram, which the DBModeling.vsd file defines:

click to expand: this figure shows the database model diagram that displays the tables in the airlines reservation system and the relationships between these tables.
Figure 5-3: The Database Model Diagram

To create the DBModeling.vsd file that defines the Database model diagram:

  1. Open Microsoft Visio.

  2. Select File->New->Database->Database Model Diagram.

  3. Select Database->View->Project. The project window appears.

  4. Right-click the project icon in the project window and select Add Existing Document.

  5. Specify the path of the ORMModeling.vsd file and click Open.

  6. Select Database->Project->Build and specify the file name as DBModeling.vsd.

  7. Drag and drop the entities in the Tables and Views window onto the Visio page to view the database model diagram.

The AIRLINES.DDL file defines the physical database schema to generate the airlines database. The DBModeling.vsd file generates the AIRLINES.DDL file using the Database Generate wizard of Visio. To create the AIRLINES.DDL file:

  1. Open Microsoft Visio.

  2. Open DBModelling.vsd file.

  3. Select Database->Generate. The Generate Wizard opens.

  4. Specify the File name as AIRLINES.DDL and follow the wizard steps to generate the AIRLINES.DDL file.

The AirlinesReservation project consists of the following files:

  • Shared.vb : Provides the main() function that establishes a connection with the airlines database and invokes the Application Manager window.

  • frmApplicationManager.vb : Provides the ApplicationManager class that defines the Application Manager window, which enables an end user to browse through the Airlines Reservation application.

  • frmAirlines.vb : Provides the Airlines class that defines the Airlines window, where an end user can add new Airlines, and view and delete existing Airlines.

  • frmAircrafts.vb : Provides the Aircrafts class that defines the Aircrafts window, where an end user can add new aircraft for an Airline, and view and delete existing aircrafts.

  • frmReservation.vb : Provides the Reservation class that defines the Reservation window where an end user can reserve seats for travelers.

  • frmConfirmation.vb : Provides the Confirmation class that defines the Confirm Reservation Information window that enables an end user to view the reservation information and confirm the reservation.

Figure 5-4 shows the class diagram for the Airlines Reservation application:

the figure shows the classes airlines, aircrafts, reservation, applicationmanager, confirmation, and a module, shared, in the airlines reservation application.
Figure 5-4: The Class Diagram for the Airlines Reservation Application



NET InstantCode. UML with Visio and Visual Studio .NET
NET InstantCode. UML with Visio and Visual Studio .NET
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 49

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net