An RMSfile is a grouping of logically related records. Each record contains the same information, e.g., name, address, city, etc. These elements are called fields. A collection of RMSfiles is called a database.
When you create a database, you should group information for efficiency and economy so that the same data does not have to be stored in more than one file. For example, names and addresses of subscribers used for mailing magazines are kept in one file, while the actual subscription records are identified by subscriber code in another file. When the subscription file is accessed and the subscriber name is required, the subscriber file is accessed with the subscriber code as a key.
The first step in developing the Demonstration Subscription System is to define the RMSfiles. To do this, data fields for the three files described above must be defined.
a. mag: - This file contains pertinent information for each magazine. It contains the following fields:
These data fields are defined as follows:
magazine - a string of characters identifying each magazine. This is not the formal title of the magazine; it is just an abbreviated name that identifies the magazine. This field is the key field, i.e., the field that uniquely identifies the record.
title - a string of characters representing the actual magazine title.
year_rate - the cost of the magazine for a standard subscription period.
subscribers - the count of all subscribers for this magazine.
b. sub: - This is the file that contains information on all subscribers. Each record in this file has the following data fields:
These fields are defined as follows:
subscriber - a string of characters that uniquely identifies individual subscribers within the subscriber file. The subscriber field is the key for this file.
name - a string of characters representing the subscriber name as it is to appear on reports, mailing labels, etc.
address - a string of characters identifying the street address of each subscriber (2 lines).
city - a string of characters that identifies the city.
state - a string of characters identifying the state (be sure to make the field large enough to handle addresses in foreign countries).
zip - a string of characters identifying the zip code (for U.S. addresses) or postal code (for addresses in foreign countries).
c. script: This is a file containing a single record entry for each magazine subscription made by a subscriber. The fields for the subscription file are as follows:
These fields are further defined as follows:
subscriber - a string of characters that identifies the subscriber. This string is identical to the subscriber field in the subscriber file. It is also the key for this file.
magazine - a string of characters that identifies the magazine. Much like the subscriber field, this field is identical to that used in the file mag.
issues - a numeric field containing the number of issues remaining for this subscription prior to expiration.
started - the date that the subscription began.