OpenOffice.org OpenOffice - 3.0 Quick Start Guide Page 253

  • Download
  • Add to my manuals
  • Print
  • Page
    / 433
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 252
Figure 185: View of some fields from the Vacations table
A View is also a table. Its fields come from the fields of one or more
tables of the database. It provides a way to look at a number of fields
without regard to the table to which any of the fields belong. A View
can consists of some of the fields of one table as in Figure 185. Or, it
can consist of fields from more than one field as in Figure 186.
Figure 186: View of fields from the Fuel and Payment Type tables
Caution
Data can not be entered into a View like it can be added to a
table. It is strictly for viewing data which has already been
entered into the table.
Defining relationships
Now that the tables have been created, what are the relationships
between our tables? This is the time to define them based upon the
questions we asked and answered in the beginning.
When on vacation, we want to enter all of our expenses all at one time
each day. Most of these expenses are in the Vacations table, but the
fuel we buy is not. So, we will relate these two tables using the Date
fields. Since the Fuel table may have more than one entry per date,
this relationship between the Vacations and Fuel tables is one to many.
(It is designated 1:n.)
The Vacations tables also contains several fields for the type of
payment used. For each field listing the payment type, there is only
one entry from the Payment Type table. This is a one to one
relationship: one field in one table to one entry from the other table. (It
is designated 1:1.) Other tables also contain fields for the type of
payment. The relationship between these fields of those tables and the
Payment Type table are also 1:1.
Since the Payment Type table only provides a static list, we will not be
defining a relationship between the Payment Type table and the fields
Chapter 8 Getting Started with Base 253
Page view 252
1 2 ... 248 249 250 251 252 253 254 255 256 257 258 ... 432 433

Comments to this Manuals

No comments