Databases Reference
In-Depth Information
RESTYPE.DESCRIPTION,
LOC.CITY,
COUNTRY.COUNTRY,
COUNTRY.ID COUNTRY ID,
USR.LAST NAME,
BOOKING.PERIOD START,
BOOKING.PERIOD END
FROM ODT BOOKING BOOKING
INNER JOIN ODT RESOURCE RES
ON (RES.ID = BOOKING.RESOURCE ID)
INNER JOIN ODT LOCATION LOC
ON (LOC.ID = BOOKING.LOCATION ID)
INNER JOIN ODT RESOURCE TYPE RESTYPE
ON (RESTYPE.ID = RES.RESOURCE TYPE ID)
INNER JOIN ODT COUNTRY COUNTRY
ON (COUNTRY.ID = LOC.COUNTRY ID)
INNER JOIN ODT USER USR
ON (USR.ID = BOOKING.USER ID);
When you describe this view in your development environment you will see a definition like Figure
9-11 (unless you look at the code behind the view).
Figure 9-11. View definition (classical approach)
Using the APEX wizards to generate a page on this view will result in the following items being
created automatically (assuming the new page number is 8): P8 ID , P8 RESOURCE ID , P8 LOCATION ID ,
P8 RESOURCE ID , P8 RESOURCE NAME , P8 DESCRIPTION , P8 CITY , P8 COUNTRY , P8 COUNTRY ID , P8 LAST NAME ,
P8 PERIOD START , P8 PERIOD END , P8 MODIFIED BY , and P8 MODIFIED DATE .
The columns P8 ID , P8 PERIOD START , P8 PERIOD END , P8 MODIFIED BY , and P8 MODIFIED DATE are
especially ambiguous, since they can originate from one or more source tables. You can only be sure if
you look at the code of the view ODT BOOKING V .
Now ,implement the same features using the suggested naming convention. The view FM BOOKING V
will look like Listing 9-9.
Search WWH ::




Custom Search