Flat File Database 1


Database with a Single Table


The Nip Shoppe needed a database to keep track of their customers, products and orders. In the fast-paced world of catnip marketing, efficient data management is essential!

After an exhaustive search, Miss Kitty, head of the Nip Shoppe IT Department, decided to use a flat-file relational database because it was simple enough for cats to understand.

Of course, Miss Kitty's exhaustive search was so exhausting that she needed a nap. But before she fell asleep, she managed to create a database table: 'Products', which you can see in this example::


 Nip Shoppe

Top Level Files

 Nip Shoppe DBMS-1 files

inc file

 Nip Shoppe DBMS-1 inc files

products file

 Nip Shoppe products records

Products are represented by text files within the 'data/products' folder. The 'database-functions' file contains the two functions necessary to read and write to this database; readDatabaseRecord and writeDatabaseRecord. An array of field names is used to identify data fields within records:



View Code
Top-level folder:
data/products folder:
Inc folder: