Docsity

Database Design Verification and Logical Design: A Study Guide, Exams of Information Technology

Partial preview of the text

Download Database Design Verification and Logical Design: A Study Guide and more Exams Information Technology in PDF only on Docsity!

Best Exam Study Guide Appendix C:

Conceptual Design, Verification, Logical

Design.

100% Verified Questions and Answers

Design, Verification, Logical Design.

100% Verified Questions and Answers 2024/

Discussion Focus

How is a database design verified, and why is such verification necessary?

Use our detailed answer to question 1 to focus class discussion on database design verification. Stress that the verification process uses the initial ER model as a communication tool.

The designer may begin the verification process by describing the organization's operations to its end users, basing the detailed description on the initial ER model. Next, explain how the operations will be supported by the database design. Stress that the design must support the end-user application views, outputs, and inputs. Points to be addressed include such questions as:  Is the description accurate? If not, what aspects of the description must be corrected?  Does the model support the end-user requirements? If not, what aspects of the end-user requirements have not been addressed or have been addressed inadequately?

Keep in mind that even a model that perfectly addresses all initially determined end user requirements is likely to need adjustments as those end users begin to understand the ramifications of the database design's capabilities. In many cases, the end users may learn what the organization's processes and procedures actually are, thus leading to new requirements and the perception of new opportunities. The database designer must keep such likely developments in mind, especially if (s)he works as a database design consultant. (Anticipation of such developments must be factored into the contract negotiations for consulting fees.)

Discuss the role of the system modules.

The use of system modules can hardly be overemphasized in a database design environment. Stress these module characteristics and features:  Modules represent subsets of the database model: Smaller "pieces" are more easily understood.  Modules are self-contained and accomplish a specific system function; if such a system function must be modified, other functions remain unaffected.  Modules fit into a modular database design, which is more easily modified and adapted to new circumstances. Because modification efforts are focused on a database subset, productivity of both designers and application developers is likely to be enhanced.

Module interfaces must be clear if the modules are expected to work well within the overall system.

Design, Verification, Logical Design.

100% Verified Questions and Answers 2024/

Specifically, this step requires the identification and definition of the database transactions that represent the module's real-world operations.

Design, Verification, Logical Design.

100% Verified Questions and Answers 2024/

4. Verify **each of the transactions against the database.

  1. What steps must be completed before the database design is fully implemented? (Make sure that you list the steps in the correct sequence and discuss each step briefly.)**

The DBLC, discussed in detail in Chapter 9, “Database Design,” constitutes a database's history, tracing it from its conceptual design to its implementation and operation. We highly recommend that the database designer follow the DBLC's steps carefully in order to ensure that the database will properly meet all user and system requirements.

Before a database can be successfully implemented, the following steps must be completed:

  1. Define the conceptual model's components: entities, attributes, domains, and relationships.
  2. Normalize the database to ensure that all transitive dependencies are eliminated and that each entity's attributes are solely dependent on its key attribute(s).
  3. Verify the conceptual model to ensure that the proposed database will meet the system's transaction requirements and that the end-user and systems requirements will be met.

The verification process will probably delete and/or create entities, attributes, and relationships. It may also refine existing entities, attributes, and relationships.

  1. Create the logical design which requires the definition of the table structures , using a specific DBMS (relational, network or hierarchical). Logical design also includes, if necessary, appropriate indexes and views.
  2. Create the physical design to define access paths, including space allocation, storage group creation, table spaces, and any other physical storage characteristic that is dependent on the hardware and software to be used in the system's implementation.
  3. Implement the design. Somehow, this last step seems to suffer from planning neglect, to the detriment of the system's operation. Implementation, operation, and maintenance plans must (at least) include careful definition and description of the activities required to implement the database design:  loading and conversion  definition of database standards  system and procedures documentation: security, backup, and recovery  operational procedures to be followed by users  a detailed training plan  identification of responsibilities for operation and maintenance. 3. What major factors should be addressed when database system performance is evaluated? Discuss each factor briefly.

Database systems performance refers to the system's ability to retrieve information within a reasonable amount of time and at a reasonable cost. Keeping in mind that "reasonable" means different things to different people, we must address at least these important performance factors:

Design, Verification, Logical Design.

100% Verified Questions and Answers 2024/

 Resource limits The fewer resources that are available to the user, the longer the access queues will be.  Communication speeds Lower communication speeds mean longer response times.  Query response time Queries must be tuned to provide optimum query response time. (See Appendix C, “Database Performance Tuning.”) Lack of query response tuning means slow response times. Depending on how good the design and the program code are, the query response time can vary from minutes to hours for the same query.

Although the preceding discussion is focused on the speed aspect of performance, there are other equally important issues that must be considered. A successful database implementation requires a balanced approach to all database issues, including concurrency control, query response time, database integrity, security, backup and recovery, data replication, and data distribution.

4. How would you verify the ER diagram shown in Figure QC.4? Make specific recommendations.

Figure QC.4 The ERD for Question 4

The verification process must include the following steps:

Design, Verification, Logical Design.

100% Verified Questions and Answers 2024/

  1. Identify and define the main entities, attributes, and domains. In this case, the main entities are PARTS, SUPPLIER, PRODUCT, and CUSTOMER. Identify proper primary keys and composite and multi-valued attributes.
  2. Identify and define the relationships among the entities. By examining the diagram, we may conclude that several M:N relationships exist: PARTS and SUPPLIER PARTS and PRODUCTS PRODUCT and CUSTOMER
  3. Identify the composite entities and their primary and foreign keys. Each composite (bridge) entity creates the connection to maintain a 1:M relationship with each of the original entities.
  4. Normalize the model.
  5. Verify the model, starting with the identification of the central entity. Given the ER diagram's layout, we conclude that the central entity is PRODUCT.
  6. Identify each module and its components. Three modules can be identified:  Inventory, containing PARTS and SUPPLIER  Production, containing PARTS and PRODUCT  Sales, containing PRODUCT and CUSTOMER
  7. Identify each module's processes or transaction requirements. Start by listing known transaction descriptions by module. For brevity's sake, we will use the inventory module as an example. The inventory module supports the following transactions:  Add a new product to inventory  Modify an existing product in inventory  Delete a product from inventory  Generate a list of products by product type  Generate a price list with product by product type  Query the product database by product description

Check the database model against these transaction requirements, verify the model's efficiency and effectiveness, and make the necessary changes.

5. Describe and discuss the ER model's treatment of the UCL's inventory/order hierarchy: a. Category b. Class c. Type d. Subtype

The objective here is to focus student attention on the details of the UCL's approach to inventory management. Note that the UCL's ER model uses two closely related entities to manage items in inventory: ITEM and INVENTORY_TYPC. These two entities maintain a 1:M relationship: One item belongs to only one inventory type, but an inventory type can contain many items.

Design, Verification, Logical Design.

100% Verified Questions and Answers 2024/

CATEGORY Hardware

CLASS Personal Computer (PC ) Printer (PR)

TYPE Desktop (DT) Inkjet(IJ)

SUBTYPE Intel P4 (300) Intel P5 (600) Black (BL) Color (CO)

GROUP CATEGORY CLASS TYPE SUBTYPE

HWPCDTP5 Hardware (HW) Personal Computer (PC) Desktop (DT) Pentium (P5) HWPCLP48 Hardware (HW) Personal Computer (PC) Laptop (LT) Pentium IV HWPRLS Hardware (HW) Printer (PR) Laser (LS) Standard HWPRDM80 Hardware (HW) Printer (PR) Inkjet (IJ) 80 - column SUPPSS11 Supply (SU) Paper (PP) Single Sheet (SS) 8.5" x 11" l HWEXHDID Hardware (HW) Expansion Board (EX) Video (VI) XX SWDBXXXX Software (SW) Database (DB) XX XX

The classification hierarchy may also be illustrated with the help of the tree diagram shown in Figure QC.5:

Figure QC.5 The INV_TYPE Classification Hierarchy As a Tree Diagram

6. Modern businesses tend to provide continuous training to keep their employees productive in a fast-changing and competitive world. In addition, government regulations often require certain types of training and periodic retraining. (For example, pilots must take semiannual courses involving weather, air regulations, and so on.) To make sure that an organization can track all training received by each of its employees, trace the development of the ERD segment in Figure QC.6 from the initial business rule that states:

An employee can take many courses, and each course can be taken by many employees.

Design, Verification, Logical Design.

100% Verified Questions and Answers 2024/

Once you have traced the development of the ERD segment, verify it and then provide sample data for each of the three tables to illustrate how the design would be implemented.

Figure QC.6 The ERD Segment for Question 6

Follow the verification steps described in the answer to question 4. Note that the composite TRAINING entity shown in Figure QC.6 reflects part of the verification process that began with the M:N relationship between EMPLOYEE and COURSC. (An employee can take many courses and many employees can take each course.)

Part of the verification process involves the elimination of multi-valued attributes. For example, an EMPLOYEE table that contains an attribute EMP_TRAINING containing strings such as “fire safety, weather, air regulations” have already been eliminated by the composite TRAINING entity. The structure shown in Figure QC.6 allows us to add attributes to ensure that training details – such as dates, grades, training locations, etc. -- can be traced, too.

One additional – and very important -- point is worth mentioning: at this point, Figure QC.6’s ERD cannot handle recurrent training requirements. That is, if some courses must be retaken periodically, as is common in many transportation businesses, the TRAINING entity’s PK – at this point composed of the EMP_NUM + COURSE_CODE – will not yield a unique value if the course is retaken from time to time. The solution to this problem can be found in either one of two ways:

  1. Add the training date to the TRAINING entity’s composite PK to become EMP_NUM + COURSE_CODE + TRAIN_DATC. This approach is illustrated in the examples shown in Tables QC.6A through QC.6C. Note that employee 105 took the FAR-135-P course on 26-Sep- 2013 and on 11-Feb-2014. Employee 101 took the WEA-01 course on 26-Sep-2013 and on 26- Mar-2014. Note that the addition of the TRAIN_DATE to the composite PK prevents the duplication of training records. For example, if you tried to enter the first TRAINING record twice, the combination of EMP_NUM+COURSE_CODE+TRAIN_DATE would not be unique and the DBMS would diagnose an entity integrity violation.

Table QC.6A The EMPLOYEE Table Contents

EMP_NUM EMP_LNAME 105 Ortega 101 Williams

Design, Verification, Logical Design.

100% Verified Questions and Answers 2024/

the parent table uses a composite PK, how can you then create the appropriate FK?) In any case, the declaration of a composite PK automatically generates a matching composite index, so you would not decrease the index library if you used approach 1.

7. You read in this appendix that:

An examination of the UCL's Inventory Management module reporting requirements uncovered the following problems:The Inventory module generates three reports, once of which is an Inventory Movement Report. But the inventory movements are spread across two different entities (CHECK_OUT and WITHDRAW). That spread makes it difficult to generate the output and reduces the system's performance.An item's quantity on hand is updated with an inventory movement that can represent a purchase, a withdrawal, a check-out, a check-in, or an inventory adjustment. Yet only the withdrawals and check-outs are represented in the system.

What solution was proposed for that set of problems? How would such a solution be useful in other types of inventory environments?

The proposed solution was to create a common entry point for all inventory movements. This common entry point is represented by a new entity named INV_TRANS. The INV_TRANS entity is used to record an entry for each inventory transaction. In other words, the system keeps track of all inputs to and withdrawals from inventory by using this INV_TRANS entity.

It is important to realize that the INV_TRANS entity is a crucial entity in the system, because it reflects all item transactions. Such a solution is not unique to the UCL's inventory system: Most inventory systems must be able to keep track of such transactions. Having a central point of reference facilitates the processing, updating, querying, and reporting capabilities of the inventory system.

The UCL's data model keeps track of several types of inventory transaction purposes or motives: checkouts, withdrawals, adjustments, and purchases. Note the system's flexibility: The user is able to classify all inventory transactions by type and/or motive.

In addition to being flexible, the UCL system is easily expandable: If necessary, the system can support additional types of inventory transaction motives. For example, the system may be expanded to include inter-warehouse inventory transfers, items retired from inventory because they are date- limited, and so on. (Date-limited inventory is typical for such things as pharmaceuticals, food, etc.)

Given its flexibility and expandability, we may conclude that the UCL system's inventory data model represents a very viable solution to modeling real world inventory transactions. Therefore, it may be used to fit into just about any inventory environment.

Design, Verification, Logical Design.

100% Verified Questions and Answers 2024/

To answer this question, return to the discussion about fine-tuning the database for performance, integrity, and security. Based on the estimation of the number of transactions, the number of items, and the number of the possible concurrent accesses to the INV_TRANS entity, it was clear that this entity will be one of the most active in the system. The large number of check-outs reports and the even larger expected number of inventory transactions prompted both the designer and the end user to choose either controlled redundancy or having a performance bottleneck.

Perhaps some students will argue that the use of the CHECK_OUT and CO_ITEM entities represents a major burden to the system and that, therefore, the system should be implemented without these entities. This argument clearly has some merit: The only immediate advantage of having the CHECK_OUT and CO_ITEM entities is that the Inventory check-outs report uses these entities, rather than the INV_TRANS and INTR_ITEM entities. Therefore, the elimination of CHECK_OUT and CO_ITEM reduces the concurrent access conflicts for the INV_TRANS and INTR_ITEM entities.

Finally, we note that both the designer and the end user are aware of the consequences of the selected solution. Remember, this is a real solution to a real problem, and it helps to illustrate the point that we made earlier: The best solution is not always the one that is implemented. Each system is subject to constraints, and the designer must inform the end user of the consequences of the data modeling design selections.

An important note in primary key selection for multi-user systems

The LOG is an entity that keeps a record of all the students that use the UCL. Note that the primary key is formed by LOG_DATE, LOG_TIME, and USER_ID.

Ask the students why USER_ID has been made a part of the primary key. Since each user can be in only one place at one time, it seems safe to assume that USER_ID does not need to be part of the primary key. So why not just use a primary key composed of LOG_DATE and LOG_TIME? For example, suppose that the student Christobal Colombus enters the UCL on 02-Mar-2014 at 02:10:11 pm. To use

Note: Optimum vs. Implemented Solutions.

The final UCL ERD makes use of the INV_TRANS entity to replace the WITHDRAW entity. Perhaps some of your students wonder about the similarity of the CHECK_OUT and CO_ITEM entities when compared to the INV_TRANS and INTR_ITEM entities. For instance, it is quite appropriate to argue that CHECK_OUT is a type of inventory transaction and that, therefore, CHECK_OUT is a subtype of an INV_TRANS supertype. Why did the designer create such apparent system redundancy? Why wasn't the type/subtype hierarchy used more efficiently? (Classification hierarchies and supertypes/subtypes are covered in Chapter 5, “Advanced Data Modeling.”)

Design, Verification, Logical Design.

100% Verified Questions and Answers 2024/

Problem Solutions

1. Verify the conceptual model you created in Appendix B, problem 3. Create a data dictionary for the verified model.

The verification of the car dealership's database design conforms to the verification process described in Appendix C. (We have also illustrated the verification process in this appendix's review question 4.) Since the verification process has already been explored in depth in several places, we will focus on the ERDs that were modified during the course of the verification process. Use the Data Dictionary format shown in Chapter 7, “Introduction to Structured Query Language (SQL),”Table 7.3 as your data dictionary template.

The basic verified database design is shown in Figure PC.1. As you discuss Figure PC.1, note that the verification process substantially modified the service component of the initial ERD. (See the discussion that accompanies Figure PD.3a in this manual’s Appendix D, problem 3.) These changes reflect the increasingly important accountability requirements. As you examine the ERD in Figure PC.1, focus on the following features:  SALESPERSON and MECHANIC are subtypes of the supertype EMPLOYEE. This feature is based on the likelihood that the subtypes contain data that are unique to those subtypes. For example, a sales person is likely to have at least part of his/her pay determined by sales commissions. Similarly, mechanics are likely to have special certification and training requirements that “general” employees are not likely to have. The use of these subtypes eliminates nulls in the EMPLOYEE table, thus making them desirable in this case.  Although some employee job-related data are stored in their subtypes – see, for example, our discussion of the SALESPERSON and MECHANIC subsets – we still need to know what the employee job assignments are. Although we have not included pay and benefit options in this design, both options are likely to be job related. Some jobs are paid on an hourly basis, some on a weekly basis, and some jobs are salaried. Base pay schedules are usually determined by job qualifications. Therefore, the JOB entity stores a JOB_PERIOD attribute (hour, week, or year) and a JOB_PAY attribute. If the JOB_PERIOD = “hour”, the JOB_PAY = $18.90 is clearly an hourly rate. If the JOB_PERIOD = “year”, a JOB_PAY = $45,275 is clearly a yearly salary. In larger companies, job assignments are useful in tracking the distribution of job “densities” to see if some job classification distributions are appropriate to meet the business objectives. (Do we have too many employees who are classified as “support” personnel? Too many accountants?) Also, note that the relationship between JOB and EMPLOYEE reflects the business rules that each employee has only one job assignment at a time. Naturally, any given job can be held by many employees. For example, many employees may be mechanics, support personnel, accountants, and so on.

… Additional discussion points follow Figure PC..

Design, Verification, Logical Design.

100% Verified Questions and Answers 2024/

Figure PC.1 The Verified Car Dealership Crow’s Foot ERD

Design, Verification, Logical Design.

100% Verified Questions and Answers 2024/

Design, Verification, Logical Design.

100% Verified Questions and Answers 2024/

… continued discussion of Figure PC.1’s ERD.

 To track all maintenance procedures and parts precisely, only qualified mechanics may open and close service logs, check out parts, and sign off service work. Note that the PART_LOG tracks all parts that have been logged out. The relationship between SERVICE_LOG and PART_LOG lets us trace all checked-out parts to a specific service log entry. The use of the PART_CODE in both the SVC_LOG_LINE and the PART_LOG entities makes it possible to write a query to let us check whether or not a logged out part was actually used. All the maintenance actions can be tracked at this point. We know who opened and closed the service log through the SCV_LOG_ACTION. We know which mechanic performed each maintenance procedure (in the SVC_LOG_LINE), and we know which mechanic checked out which part(s) – in PART_LOG.  If a car was sold by the dealer, that fact is recorded in an invoice. However, the CAR entity may be expanded to include a “bought here” Y/N attribute, in addition to mileage and other pertinent data. Also, cars owned by the dealership may simply show the dealer as the “customer.” (Naturally, you can add a DLR_CAR entity if the dealer car attributes and data tracking requirements are different from the customer CAR data.)  Before any car is sold to a customer, that car must be inspected and, if necessary, repaired. Therefore, even a new car will show up in the SERVICE_LOG. Therefore, the SVC_LOG_NUM will never be null in the INVOICE … even if the invoice records the sale of a car, rather than a specific service charge.  The PAYMENT entity has a rather limited set of options at this point. However, it does enable the manager to track multiple payments on a given invoice and to keep track of specific invoice balances. Further verification procedures would (most likely!) add functionality to the PAYMENT entity. For example, you might change the PAYMENT entity to an account transaction entity, perhaps named ACCT_TRANSACTION. This change would reflect the need to identify the transaction type – debit or credit – and, if a payment is made, the payment mode – cash, credit card, check.  The employee qualifications can now be tracked without limit. If an employee gains an additional qualification, all that is needed is an entry in the EDUCATION table.  The customer car data are stored in CAR, so we can keep the service records on all the customer cars, thus producing the required car histories. (To save space, we have not included all the appropriate attributes – but you can add such attributes as CAR_BOUGHT (Y/N) to indicate whether or not the car was bought at this dealership, CAR_LAST_MILES to indicate the mileage recorded during the most recent service, and so on.)  At this point, we assume that the SERVICE_LOG and SVC_LOG_LINE records yield the information required to bill the customer.