OpenOffice.org OpenOffice - 3.0 Quick Start Guide Page 239

  • Download
  • Add to my manuals
  • Print
  • Page
    / 433
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 238
Base creates
relational databases
. This makes it fairly easy to create a
database in which the fields of the database have relationships with
each other.
For example: Consider a database for a library. It will contain a field
for the names of the authors and another field for the names of the
books. There is an obvious relationship between the authors and the
books they have written. The library may contain more than one book
by the same author. This is what is known as a one-to-many
relationship: one author and more than one book. Most if not all the
relationships in such a database are one-to-many relationships.
Consider an employment database for the same library. One of the
fields contains the names of the employees while others contain the
social security numbers, and other personal data. The relationship
between the names and social security numbers is one-to-one: only one
social security number for each name.
If you are acquainted with mathematical sets, a relational database can
easily be explained in terms of sets: elements, subsets, unions, and
intersections. The fields of a database are the elements. The tables are
subsets. Relationships are defined in terms of unions and intersections
of the subsets (tables).
To explain how to use a database, we will create one for automobile
expenses. In the process, we will be explaining how a database work.
Planning a database
The first step in creating a database is to ask yourself many questions.
Write them down, and leave some space between the questions to later
write the answers. At least some of the answers should seem obvious
after you take some time to think.
You may have to go through this process a few times before everything
becomes clear in your mind and on paper. Using a text document for
these questions and answers makes it easier to move the questions
around, add additional questions, or change the answers.
Here are some of the questions and answers I developed before I
created a database for automobile expenses. I had an idea of what I
wanted before I started, but as I began asking questions and listing the
answers, I discovered that I needed additional tables and fields.
What are the fields going to be? My expenses divided into three broad
areas: fuel purchases, maintenance, and vacations. The annual cost for
Chapter 8 Getting Started with Base 239
Page view 238
1 2 ... 234 235 236 237 238 239 240 241 242 243 244 ... 432 433

Comments to this Manuals

No comments