1
0
Fork 0

Update database from disk in case of changes

This commit is contained in:
Joris van der Hoeven 2015-04-15 08:08:24 +00:00
parent 7da4eb33e1
commit cea0e5d1dc
2 changed files with 23 additions and 23 deletions

View File

@ -6,13 +6,16 @@
<tmdoc-title|The <TeXmacs> database model>
The <TeXmacs> database manipulation API has mainly been designed for
internal use and not as a<nbsp>general purpose interface to SQL. In
particular, we only support a limit number of entry types and field types,
although new types can easily be added later. Currently, databases are used
for managing remote files, bibliographies, user lists, versions, etc.
internal use. It is based on a<nbsp>dedicated
<hlink|NoSQL|http://en.wikipedia.org/wiki/NoSQL>-style database model,
using a variant of <hlink|column data stores|http://en.wikipedia.org/wiki/Column_%28data_store%29>.
For the moment, we only support a limit number of entry types and field
types, although new types can easily be added later. Currently, databases
are used for managing remote files, bibliographies, user lists, versions,
etc.
The interface has been kept to be as simple as possible, so that our
SQL-based implementation can be most easily optimized for efficiently when
The interface has been kept to be as simple as possible, so that our low
level implementation can be most easily optimized for efficiently when
needed. Furthermore, the routines of our basic API can all be customized
<em|a posteriori> to add specific features. For instance, the basic API is
string-based, so a<nbsp>special additional layer was added to support
@ -30,14 +33,6 @@
alternative time for database queries, which make it possible to easily
recover any past state of the database.
From the SQL implementation point of view, the database consists of a
single table with five columns: unique identifier, attribute, value,
creation date, expiration date. Grouping together rows with the same
identifier, one obtains the various entries. Grouping together rows with
the same identifier and the same attribute, one obtains the individual
values. Strictly speaking, the creation and expiration dates apply to
individual values in the lists of values.
<paragraph|Macros for context specification>
<\explain>

View File

@ -5,15 +5,20 @@
<\body>
<tmdoc-title|Indexation>
The purpose of the first extension of the basic database API in
<scm|index-base.scm> is to permit searching for certain keywords in the
database entries. The current implementation achieves this by maintaining a
few additional tables with the list of entries in which given keywords
occur and counters of how many times a given keyword appears. We also
maintain a few additional prefix tables which allow us to search for
uncompleted keywords. The indexation mechanism only indexates
alphanumerical keywords and normalizes all keywords to lowercase; see
<verbatim|indexation.cpp> for more details.
The purpose of the first extension of the basic database API is to permit
searching for certain keywords in the database entries. The current
implementation achieves this by maintaining a<nbsp>few additional tables
with the list of entries in which given keywords occur. We also maintain
a<nbsp>few additional prefix tables which allow us to search for
uncompleted keywords. For efficiency reasons, the indexation is done at a
low level in C++.
It should be noticed that the indexation mechanism only indexates
alphanumerical keywords and normalizes all keywords to lowercase. Accented
characters and characters in other (<abbr|e.g.><nbsp>cyrillic) scripts are
also ``transliterated'' into basic unaccented roman characters. For
instance, we write ``é'' and ``\<#449\>'' as ``e'' and ``shch''. As a
consequence, a search for ``poincare'' will match ``Poincaré''.
<paragraph|Macros for context specification>