Dear Roy,

I am far from being a BaseX expert, but I can give a few hints, please see below.

 

Best regards,

Fabrice Etanchaud

Questel/Orbit

 

De : basex-talk-bounces@mailman.uni-konstanz.de [mailto:basex-talk-bounces@mailman.uni-konstanz.de] De la part de Ando Roy
Envoyé : jeudi 28 novembre 2013 17:05
À : basex-talk@mailman.uni-konstanz.de
Objet : [basex-talk] New user requiring help in population of database

 

Hi all,

 

I'm a new user of BaseX and would like to get myself up to speed with development as quickly as possible.Hope to get some pointers from the experts here, as I'm still picking up the concepts required in the use of XML Databases.

 

I am experimenting with porting over some content from an existing RDBMS project to BaseX and would like to know how to go about doing it. I have already designed a XML schema based on my RDBMS model and would like to know how I can quickly go about populating the database in BaseX. Just a few quick questions here:

 

1.      How should I go about creating the tree structure and its nodes (i.e. elements with attributes)? I'm a little confused (perhaps because I'm trying to approach it from a RDBMS perspective).

 

 

>> BaseX does allow you to store documents with different schemas in a same collection. No need to create an empty tree structure before loading documents, it’s a bit like a legacy network or hierarchical database without predefined schema.

The collection’s schema will evolve after each document load, you can get the current schema of a collection by calling the index:facets(‘collection name’) xquery function.

I strongly encourage you playing with the GUI, and start loading your first data sets.

 

2.      Is there a quick way to populate the database from some existing data sets (i.e. CSV or text files)?*

 

>> BaseX allow you to load CSV or text files. They will be converted in their tree representation (lines of text or column values).

This can ease a first exploration of your data, but IMHO you should transform your tabular data in xml reflecting its hierarchical relationships.

Another point is to dispatch data between elements and attributes, to take full advantage of the different BaseX indexes.

 

 

Hope I did help you.

Be careful, BaseX is very addictive when it comes to processing xml data !

 

 

Thanks!

 

Regards,

Roy