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).
2. Is there a quick way to populate the database from some existing data sets (i.e. CSV or text files)?
Thanks!
Regards, Roy
Hello Roy,
we always appreciate new users, so thanks for switching to BaseX :)
However, I personally find it rather difficult to give general guidelines to how to model your data. As relation databases are simple tables, whereas XML is structured and hierarchical, it is simply to difficult to tell. It also depends on what queries you want to execute. I don't think there is _the_ one way to do it right. We might be able to give you more and better advice if you describe specific data set.
Regarding your second question: Yes, thats possible. Take a look at our parsers (https://docs.basex.org/wiki/Parsers), CSV and text parsers are available.
Cheers, Dirk
On 28/11/13 17:04, Ando Roy wrote:
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:
- 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).
- Is there a quick way to populate the database from some existing data
sets (i.e. CSV or text files)?
Thanks!
Regards, Roy
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
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
basex-talk@mailman.uni-konstanz.de