TheFamilyPack - Common Data
Common Data Management
Home Common Data Data Management

Introduction

The management of the common database will be carried out centrally as part of The Family Pack project. The actual data store will be in the form of csv (Comma Separated Values) text files. This should provide the following advantages. It will be more dense than an SQL database or a database dump. It will allow flexability in how the data is grouped. It is more frendly towards version control systems (git).

The process is as follows:

  1. Create the data in a standard database using The Family Pack program.
  2. Assign the unique (negative) Common Data ID numbers.
  3. Add the data to the Common Data store in the form of csv text files.
  4. Use the csv files to create standard database files which can be distributed.

Utility Programs

A couple of utility programs will be developed to assist in maintaining the common data database. These programs will not be distributed as they are only for use by the project maintainers, but the code source will form part of The Family Pack repository.

File: "tables.csv"

The tables.csv ensures unique negative ID numbers are issued to the incoming common data records. It holds a list of database tables and its next available ID number.

Program: Common Data Management (cdm)

The cdm program accepts a standard database file, and using the tables.csv file, converts all the positive ID values to negative ID's. It maintains all the internal links as it does this. The tables.csv is then updated with new highest available negative ID's.

The program next writes out all the records it has just renumbered to csv files. Each table will have its own file.

The collection of csv files form the definitive database of the common data.

Program: Common Database Builder (cdb)

The cdb program will be used to read the csv files and create standard The Family Pack database files. Organizing the data into different sets is still a work in progress.

The common data .tfpd database files will be used to distributed the data to the user.

Using the Common Data

Part of the design of The Family Pack database is to allow two databases to be connected. One of the databases will be read-only, but it will be possible to transfer data from the read-only to the read-write database. In the case of common data negative ID's, the ID numbers will remain unchanged. Copying other, positive ID's, the data will be renumbered as it is transferred.

Home Common Data Data Management

Managed by WebPageLayout Validated by HTML Validator (based on Tidy)

12th January 2022