Skip to content

Configuring Databases

Irina Dragoste edited this page Nov 15, 2018 · 21 revisions

VLog supports loading facts from several databases at the same time. It also supports several database technologies. This section explains how a database source can be configured.

Vlog will load the configuration of all used data sources from a given file with .conf extension. Each data source will be associated to an EDB predicate. The .conf file configures these predicates trough properties dedicated to each such EDB. A list of n datasources will be configured by assigning n sets of properties values, each set of property names identifying its EDB by its prefix. For example, a .conf that configures two EDB predicates P and Q will contain the following lines:

EDB0_predname=P
EDB1_predname=Q

In memory database, loaded from file

VLog supports file datasources of type .csv, as well as the RDF format N-Triples (.nt). Files can also be zipped, with .gzip extension. The facts from given file will be dictionary-encoded and stored in memory. Each such file i must be configured using the following setting:

EDB[i]_predname=[predicate_name]
EDB[i]_type=INMEMORY
EDB[i]_param0=[path_to_file_parent_dir]
EDB[i]_param1=[file_name_without_extension]

Trident database

To initialise a Trident database from a N-Triples format file, one must run the following command:

./vlog load -i [path_to_N-Triples_file] -o [path_to_new_database_dir]

After the computation is terminated, VLog has created a new folder at given a copy of the database at given [path_to_new_database_dir] location, where the content of the database containing facts from [path_to_N-Triples_file] has been exported.

.conf file content, for a Trident database:

EDB0_predname=[predicate_name]
EDB0_type=Trident
EDB0_param0=[path_to_trident_database]
Clone this wiki locally