Basics | Plugins | Howtos | Applications

Relational databases

Lino is a database application, so it might happen that we sometimes use the following concepts.

database

A named set of one or more database tables, stored in one place, together with user access rights and other information.

database table

A set of rows that can be represented using a same set of database columns.

Each table is made up of rows and columns. If you imagine a table as a grid, the columns go from left to right across the grid and each entry of data is listed down as a row.

database row

A row in a database table.

database column

A column in a database table.

A database column is defined by its name and its data type. Typical data types are for example “text”, “date”, “timestamp”, “number”… The name of a column is used when selecting and ordering data, and the type is used to validate information stored.

primary key

A text or –more often– a number used to identify a given row in a given table.

Each row in a table is uniquely identified by its primary key. In SQL this can be one or more sets of column values, but Django supports only atomic primary keys, i.e. a single column that is used to store its value. No two rows can have the same primary key value. You can select every single row by just knowing its primary key.

foreign key

A specialized database field that points to another database row, potentially in another table. Technically the database server just stores the primary key and knows to which table it applies.

pointer

Synonym of foreign key.

generic foreign key

Like a foreign key, but instead of pointing always to a same table, it can point to database objects in any database table.

learning foreign key

A foreign key that can “learn”, i.e. add new items to its list of choices.

database server

A background process on a Lino server that nothing but wait for incoming requests (formulated in SQL), execute them and return a response.

ORM

(Object-relational mapping) is the technology that connects between your application program and a database server.

SQL

(Structured Query Language) is the language used by two computers when they talk about operations in a database.