The following sections describe the meaning of data and spreadsheets. Databases are introduced by using spreadsheets as a starting point.
Data
Data can take many forms, including numbers, text, images, hyperlinks, and sound. Data can be about any subject at all, or be about more than one subject.
Spreadsheets
As mentioned, I am assuming that you are familiar with spreadsheets, some common examples being Microsoft Excel, LibreOffice Calc, and Google Sheets. I will use a spreadsheet as a starting point for describing databases.
Spreadsheets and databases are both used to store and manage data. A very simplistic way of expressing the difference is to regard a spreadsheet as a large sophisticated programmable calculator and a database as a highly efficient electronic filing system that makes data quickly available for look-up and analysis. The main differences between spreadsheets and databases are how they store and manipulate data and often the amount of data involved.
A spreadsheet stores data items (e.g., numbers, text, and hyperlinks) in cells, with multiple cells represented in a system of rows and columns. Values in one cell can be related to values in other cells with the relationship defined by a formula.
Two of the most serious problems with spreadsheets are as follows:
Storing repeated data : The same data may be stored in multiple spreadsheets. If you need to make changes to the data, the same change is likely required in every location where the data is stored, thus increasing the risk of errors.
Finding data : Finding an item of data in a spreadsheet can involve scanning across numerous columns.
Hypothetical Example of a Small Business: Cards for Everyone Inc.
This book uses three case studies for the purposes of illustration: a small engineering firm, a small law firm, and a small nonprofit. They are introduced in the next three chapters. In addition, youll read about a hypothetical example that depicts a small online business called Cards for Everyone Inc., which sells a range of cards online.
Cards for Everyone Inc. buys cards from a range of suppliers and displays images of them on its web site for sale. The web site was designed by a contractor so that employees of the company can update it themselves. The business has three employees: Pat, Zeph, and Leona.
Pat, the manager, has a number of roles, including buying the supplies and marketing the business. Pat must keep the web site up to date as stock levels change.
Zeph and Leona are assistants who process the orders by locating cards in the stockroom and putting them into envelopes for distribution. When new stock arrives, they place it in the storeroom and pass the details on to Pat so that she can update the web site.
A database addresses both of these issues. Repeated data items are minimized by splitting the data into tables (made up of rows and columns) so that, ideally, each data item is stored only once. Very efficient data retrieval is made possible by relationships defined between the tables: they link the data together and make retrieval efficient. explains the pros and cons of spreadsheets and databases in more detail.
The next section gives an example of a database used by Cards for Everyone Inc.
A Database Used by Cards for Everyone Inc.
Typical data for a given customer in Cards for Everyone Inc. is their name, address, telephone number, and e-mail address. Table shows an example database table containing this data for three customers. Each customer is allocated a row in the table, also known as a record . Every record is divided into five columns, one for each part of the record (i.e., Customer ID, Name, ZIP Code, etc.). Every customer record has a unique customer identification number, called the Customer ID. No two customers can have the same Customer ID, thus avoiding duplication.
Table 1-1.
Basic Customer Database Table
Customer ID | First Name | Last Name | ZIP Code | Phone | E-Mail |
---|
| Lisa | Garcia | MI 48823 | 517-xxx-xxxx | Lgarcia@hotmail.com |
| John | Williams | OR 97062 | 503-xxx-xxxx | Jwilliams@gmail.com |
| Steve | Jones | FL 33901 | 239-xxx-xxxx | Sjones@aol.com |
Further database tables at Cards for Everyone Inc. contain details of products, suppliers, and invoices. As with the customers, each product, each supplier, and each invoice is given a unique identification number in their respective tables. Identification numbers can appear in more than one table in order to help construct relationships. At this point, these tables are for illustration purposes only; shows a table of five products for Cards for Everyone Inc., with the Product ID in column 1. Notice that the table has a column for the identification number of the supplier in column 2.