SQL-Ledger Database Explanation

by Armaghan Saqib, Wednesday, December 14, 2022, 02:09 (496 days ago)

SQL-Ledger uses postgresql as database engine. You can create as many databases in Postgres as you want; each with its own tables, indexes etc.

In SQL-Ledger, whenever you create a new dataset for a business using admin.pl, a new database is created and populated with tables and indexes required for sql-ledger.

I strongly recommend to browse any existing sql-ledger database. There are 3 tools which you can use to look into a postgresql database.

  • psql is a command line tool.
  • phpPgAdmin is browser based tool.
  • pgadmin3 is a desktop based tool.

These tools will allow you to view the structure of tables which were created using admin.pl as well as data stored in these tables.

Within the sql-ledger folder, database table and indexes information is stored in the following files which are used to create a dataset using admin.pl

  • sql/Pg-tables.sql
  • sql/Pg-indices.sql

Open these files in your text editor and go through the code to get an understanding of the database tables used in sql-ledger.

Complete thread:

 RSS Feed of thread