Database designers can take advantage of the benefits of UML, even if they are using something else to model their databases, because they can draw on the models created by others on the development team to understand the overall system that is being built.
UML models that you have seen previously in this book (and will continue to see through to the end) describe the things needed to build a well-architected system. The database designers can jump-start their database designs and ensure a common understanding amongst the team by taking advantage of other team members' work with the UML.
|
|
We are not going to rehash all that you have read in the previous chapters about the different types of models. Instead, we'll provide some additional insight on how the models can be leveraged in your database designs.
To start with, many organizations take advantage of use cases and actors as discussed in Chapter 2, “Business Models.” Use cases describe how the system will work, and actors are used to model people and systems that interact with the use cases. In this chapter, we will focus on these elements as they are used in the creation of database designs. Use case and business use case models can be very valuable to the data architects (database designers) to understand more about the data that will need to be captured and how they might optimize it based on who will access it and how.
As a designer of the database, you can get your first look into the initial components of a conceptual data model by using use cases. Even at this early point, you can see from the business use case model in Figure 6-4 that things such as Clinical Records, Residents, Physicians, and Accountants are important parts of the system. Based on this information, you can determine which things are needed in the logical data model when you are ready to design at the logical level.
Some access and processing information is also available—from the diagram, it's clear that the External Facility and Transport Service have access to the Clinical Records. [NAIB1]
Activity diagrams, which were initially discussed in Chapter 2, display the actual flows represented in the use case. They go into deeper detail on how the flow of the system will work. They use swimlanes (the vertical and sometimes horizontal lines) to help you understand who or what is responsible for performing the activity. When you understand the responsibilities, you can then use that information to determine classes you will need to capture as logical data elements. The things defined by swimlanes often require data to be captured when the system is put into place.
The activity diagram shown in Figure 6-5 provides more insight to the conceptual data. We now see that the External Care Provider can review (read), update, and return (send) the Clinical Records. The Facility Staff can provide (send) and receive the Clinical Records.
In Figure 6-6, the activity diagram demonstrates how we can find new conceptual data—Billing Records and Reimbursement Records. Also, note that eligibility might be a possible attribute of a treatment (another candidate data entity). As before, we also see which business actors can manipulate this data, providing additional insight on how to design the database for the best performance and usage. [NAIB2]
The activity diagram is often thought of as just showing the workflow, but as you can see in Figure 6-6, you can also use it to gain a greater understanding of how the system will be used and of the different entities that will be needed as the system evolves. Using structures such as swimlanes, the activity diagram provides the first set of elements needed to describe a complete logical database diagram. Yes, you can build a database design, either logical or physical, without use case and activity diagrams, but having them will help. Many of your organizations are already creating these diagrams, and the diagrams can help you build better database designs, so why not take advantage of them? Use these models to enhance your understanding of the overall system being created and what other team members have already discovered.
Class diagrams and the elements used within them were introduced in Chapter 4 when we began talking about architecture. The database designers can leverage class models created by architects and developers to understand what the architecture of the application will look like and how they might translate the models into the logical data models. A database designer can also use the class models to create his own conceptual, logical, and physical data models. We will look closer at the data models later in this chapter. In this section, we will briefly cover how to take advantage of those models already created by others.
Class models are created by architects to design application architectures and by developers to visualize the pieces of the applications they are developing and the parts others have created so that they understand how to integrate with them. As described in Chapter 4, the architect will capture the designs of the application at a higher level, but these designs play very nicely into the creation of the conceptual and logical data models. Having the higher-level models provides the database team with guidance concerning entities and information about the data that they are going to need to capture.
Class diagrams created by developers show the planned and actual structure of the application. These diagrams show the business logic that will be implemented through the application class structures and the ways the application should interface with other software and the database. Database designers can take advantage of these diagrams to gain knowledge about how to implement business rules within the database and how to architect the database to best provide application access, and to ensure that the database provides the data storage for all the information to be supplied by the application.
All in all, being able to leverage information that's used by other teams will provide a database designer with additional input to building the database. A lot of work goes into building an overall system, and anything that can be shared will provide open communication among the team to help ensure that they are all working in a consistent direction. It isn't necessary that all the database designers be working in the UML, but having the team understand the UML will enable them to communicate with other teams about work that they have already done.