75. About Calc Databases
BEFORE YOU BEGIN
40 Create a New Spreadsheet
76 Create a Calc Database
77 Import Data into a Calc Database
135 Create a Base Database
Before using a database, you need to learn how a database management system organizes data. With Calc, you can create, organize, manage, and report from data stored in your Calc spreadsheet.
Calc's row-and-column format makes it a useful tool as a database program and as a spreadsheet program. The difference between the two is how you access, change, and sort the data in the spreadsheet.
A database typically contains related data. In other words, you might create a home-office database with your household budget but keep another database to record your rare-book collection titles and their worth. In your household budget, you might track expenses, income, bills paid, and so forth, but that information does not overlap the book-collection database. Of course, if you buy a book, both databases might show the transaction, but the two databases would not overlap.
Technically, a database does not have to reside on a computer. Any place you store data in some organized format, such as a name and address directory, could be considered a database. In most cases, however, the term database is reserved for organized, computerized data.
When you design a database, consider its scope before you begin. Does your home business need an inventory system? Does your home business often need to locate a single sales contact from a large list of contacts? If so, a Calc database works well. Only you can decide whether the inventory and the sales contacts should be part of the same system or separate, unlinked systems. The database integration of inventory with the sales contacts requires much more work to design, but your business requirements might necessitate the integration. For example, you might need to track which customers bought certain products in the past.
If you need your database tables to relate to each other, so that you can create reports that, for example, compare your spending on rare books printed before 1750 and after 1750, and to see contact information for all dealers who sold you books that have appreciated in value in the past 12 months, you probably need a relational database such as Base. See Chapter 18, "Organizing Your Data with Base."
Not all database values relate to each other. Your company's loan records do not relate to your company's payroll, but both might reside in your company's accounting database. You probably would keep these in separate Calc spreadsheets, although for a small company, one spreadsheet with multiple sheets representing separate databases might be manageable.
To keep track of data, you can break down each database sheet into records and fields . A database's structure acts just like a Calc worksheet because the rows and columns in a worksheet match the records and fields in a database. This similarity between databases and spreadsheets is why Calc works well for simple database management.
Records The rows in a database representing all the data for a single item. A single employee record would consist of one employee's data, such as employee number, first name, last name, address, birth date, hire date, and so on.
Fields The columns in a database representing individual descriptions of the records. A field in an employee database might be the last name field or the hire date.
Relational database A powerful type of database program that stores data in a series of related tables and allows you to view the data in different ways.
In the following figure, the database's records are the sheet's rows, and the fields are the columns. This database is a simple checkbook-register database; you usually organize your checkbook register just as you would organize a computerized version of a checkbook , so you will have little problem mastering Calc's concepts of records and fields.
A database contains records and fields that associate to Calc's rows and columns.