Learning Outcomes
On completion of this chapter you will know:
- he concept of a database
- he concepts and uses of terms like table, record, field, record size, indexes and key fields
On completion of this chapter you will know:
Although we met a form of database already when we were learning spreadsheets, it was not a proper database in the strictest terms as defined in the IT field. A spreadsheet is designed for the mathematical manipulation of relatively small amount of mainly numeric data, whereas a database is for the storage of large volumes of mainly non numeric data and has very limited capacity for calculations. On the other hand a database has excellent means of validating data and equally excellent reporting facilities, while the spreadsheet has very limited capacities in those two areas.
Go to topThe most basic unit of a database is a table. A database can have as many tables as are required but in this introductory course we shall look at a database containing only one table. Later on we shall look at multi table databases but to start with we shall be looking at a database containing only one table.
A very simple table is shown in Listing 1‑1 above. As you can see it’s a 5X7 grid. At a quick glance we can see that it is a list of people’s names, addresses and ages. The very top row contains the names of the Fields in the table. Those are named Title, Surname, Name, Address and Age. The first row above does not actually form part of the table and is not part of the data stored in the table. It is in fact there as information to explain what is in the columns below it. The actual data starts below it in the row that contains the details about Harry Potter. This entire row is called a Record. A Table can have as many rows as is required. The only limit is the size of the disk that contains the original database. Each Record is made up of Fields. A field is where a row and a column meet. In our case the record is made up of five fields. The names of the fields indicate what type of data is to be stored there. Thus the Title field contains Mr, the Surname field contains Potter, the Name field contains Harry etc.
Although a table can contain as many records as there is space for in the disk, each record must have exactly the same number of fields. We cannot add an extra field to one record and leave the rest unchanged. Of course if we realize that we need extra information about a person such as his date of birth we can add that field to the table – but it will be added to every record in the table, not just to the one record we want.
Go to topA table is a logical structure for storing data. The various data items we wish to store are stored in Fields. A number of fields make up a record. The structure of each record must be exactly the same, in other words it must have the same number of fields and in the same order. A table can have as many records as are required and is only limited by the size of the disk on which it is stored.
Go to top