Up and Running with ALLBASE/SQL: HP 3000 and HP 9000 Computer Systems > Chapter 2 Looking at DataUnderstanding the Process |
|
Designing a database to be built with ALLBASE/SQL means examining the data you wish to store and then putting it into a form that ALLBASE/SQL can understand. In other words, you look at the logical relationships that exist within the data and then create a relational design (tables, views, indexes, etc.). The process can be complex, and you could use a number of formal design methodologies. However, you can get a good first approximation by using an intuitive approach, which is sketched very briefly in this chapter. Database design is the subject of much theoretical discussion and debate, but everyone agrees that good design results in good performance. Good database design also gives you the greatest flexibility in formulating your queries and in restructuring your databases when that becomes necessary. For these reasons, time spent on analysis and design "up front" results in time and money saved in developing a production system. A reading list at the end of this chapter provides references to additional information. If you are about to embark on a complex design, be sure to consult this material. To examine some data modeling techniques, let's imagine a small sample database. Suppose a radio station wants to create a database of classical music recordings for use by program directors and announcers. The station needs this information to plan a schedule of broadcasts, to maintain a log of what is played, and to publish a monthly listener's guide. Here are some specific data items that will be needed:
You can probably think of other items of information that might be useful (for example, the date the album was acquired), but let's use these for now. How should this data be organized? A typical user of the database would be the program director, who might ask questions like the following:
|