Team Fly 

Page 14

Image

FIGURE 1-2. Relationships to part_master

Suppose someone wanted to know where in the country a certain part was manufactured. By looking at Figure 1-2, that information is not readily available in part_master. However, part_master has a manufacturer_code. So, a person would traverse to manufacturer using manufacturer_code to get a location_id. Armed with that value, one then proceeds to location to get a quadrant column value. After this navigation is complete, a person would know where a specific part is built. Table 1-3 maps out this journey.

As illustrated in Table 1-3, we can deduce that part 33499909 comes from the Pacific Northwest—a deduction that is made by following the relationships between matching columns in the three tables in question.

CRITICAL SKILL 1.5
Work with Stored Objects

Oracle Database 10g offers the ability to store user-defined programming units in the data dictionary, called stored objects. These programming units are written in PL/SQL, the topic of Chapter 7. Without worrying about what goes inside these objects, let's do an overview of what they are all about.

Table

Part Number

Column Value

Related Column Value

part_master

33499909

manufacturer_code

3490

manufacturer

3490

location_id

5

location

5

quadrant

Pacific Northwest

TABLE 1-3. Following Relationships Between Tables

Team Fly 
0033-CRITICAL SKILL 1.5 Work with Stored Objects