Hacking guide

These are notes useful only for people interested in understanding the famflows model and maybe modifying the sources.

This is the famflows shema:

The famflows model is rather simple, but, I hope, effective.

The database schema

This is the database schema, in sqlite3's dialect. In sqlite3, the column "integer primary key" is simply an alias for the ROWID integer (a 64-bit integer which identifies the row).


  id integer primary key,
  short_name text,
  long_name text);

CREATE TABLE materialgroups (
  id integer primary key,
  title text,
  description text,
  parent_group integer );

CREATE TABLE actorgroups (
  id integer primary key,
  title text,
  description text,
  parent_group integer );

CREATE TABLE materials_types (
  id integer,
  description text );

INSERT INTO "materials_types" VALUES(0,'Estate');
INSERT INTO "materials_types" VALUES(1,'Depreciable');
INSERT INTO "materials_types" VALUES(2,'Consumable');

CREATE TABLE materials (
  id integer primary key,
  unit_id integer,
  type_id integer,
  material text,
  additional_info text,
  group_id integer,
  scale integer);

  id integer primary key,
  description text,
  actorgroup_id integer );

  id integer primary key,
  additional_info text,
  material_id integer,
  initial_value integer);

CREATE TABLE exchanges (
  id integer primary key,
  actor_id integer,
  stock_in_id integer,
  stock_out_id integer,
  in_quantity integer,
  out_quantity integer,
  time_id integer,
  memo text);

CREATE TABLE decantations (
  id integer primary key,
  stock_from integer,
  stock_to integer,
  quantity_transferred integer,
  time_id integer,
  memo text);


Static schema

Famflows uses sqlite3 as the backend.

The database schema is very simple, we have only 4 main objects

The Actor

The Material

The Stock

The Folder

Conceptually the data model of famflows is a couple of n-ary trees connected by the exchanges objects.

Stocks of the same material can be connected also by means of decantations.

The actors' tree
The materials' tree

The exchanges and the decantations

How the data is saved

General architecture of the program

Get Family Flows at
SourceForge.net. Fast, secure and Free Open Source software downloads