JDB/Layout

From J Wiki
< JDB
Jump to navigation Jump to search
JDB: Layout Columns | Queries Σ | API: Structural Records | Client/Server | Implementation | Examples

There is a 3-level directory structure:

  • Folder - a normal directory, containing any number of Databases. There can be any number of Folders.
  • Database - a subdirectory of a Folder, containing any number of Tables.
  • Table - a subdirectory of a Database, containing any number of Columns.

Corresponding classes (i.e. locales) are jdbfolder, jdbdatabase and jdbtable, while jdb is the main JDB class.

Folder, Database and Table are stored in directories of the same name, so they need to be well-formed directory names. For portability between Linux and Windows, it is best to use lower-case throughout.

Folders should be created and deleted outside of JDB. Database and Table directories are created/deleted as required by JDB.

A Table directory contains Columns as mapped files. Column names can be any character string, without blanks. The corresponding files are named c0, c1, c2 etc. A database has other files to store meta data, such as column types.

Blanks are not permitted in any names.