6.2 Data-Handling situations

The data processing requirements of a library

A library has quite a complex data processing needs. Let us look at a simple system which might be used in a small library. There is need to keep, as a minimum, three sets of data focusing on the books in  the library, the library members and the books currently borrowed:

Books: Details of all books in the library. The ISBN number is the unique identifier and so is the primary key for the file.

Members: Details of all the members of the library. A ‘Member ID’ is created to provide a unique primary key. The member is allowed three books out at any one time. A book which has been borrowed has its ISBN number placed in one of the three available fields. This is a foreign key in the record and creates a relationship between the member and the book that has been borrowed.

Borrowed: This file is constantly having records added to (a book has been borrowed) and deleted from (a book has been returned). The record contain the ISBN number of the book and which is a primary key, the member ID (foreign key) and the date die for return.capture