I’m a student and new to XML and Tamino.
I’m learning to use Tamino to see if I can use it in my project.
I started by doing a very simple comparison between Oracle and Tamino to see which is the fastest, using the ODP.NET and Tamino API for .NET in ASP.NET (C#).
I don’t know if my simple experiment makes any sense, but I did the following:
- I started by converting my relational data from Oracle, consisting in information about persons, to XML and imported it to Tamino (the TSD schema is in attachment). I have 5389 documents in the database.
- I made 2 simple queries, 1 for oracle and 1 for tamino, to retrieve the codes associated to all persons containing a specified word in the name.
Almost every query in oracle takes 0 ms to execute. Rarely takes up to 15 ms.
Almost every query in Tamino takes more than 200 ms to execute.
In both cases followed this steps:
- open connection do database
- take start time
- execute query
- take end time
- close connection to database
- show difference between times.
My question is why this enormous difference?
What is wrong with my code? (please see attachment)
Can someone help me to understand why this happens?
test.zip (3.11 KB)
You are really comparing apples with oranges.
Oracle is a relational database (table based data with relationships but no real structure). Tamino is an XML database - hierarchical data with possibly very complex structure.
One thing that would almost certainly boost performance is to use indexes on data that is to be queried.
Please note that Tamino 4.1 is relatively old and that Tamino 4.4 is due very soon.
Thank you for your answer.
Yes, you are correct… I’m comparing apples with oranges… But they do the same thing: store data.
What I’m doing here is just trying to find the best model for the database to use in my project. My data can be easily converted to the relational model, XML , OO…
I can use a relational, native XML, object oriented or other type of database. I can use Tamino, Oracle, SQL Server, Objectivity or other… but must justify why.
So, I think I can compare apples and oranges, because they are all fruits… I think this is not easy to do because as you said they all work differently. But I must justify my choice in some way. What I should do is find a fair way to this.
My idea is the end user doesn’t need to know what database is supporting the application he/she is using.
Regarding my experiment, I used indexes (standard and text) on the attributes I queried.
Perhaps in the future a new Starter kit will be available with a more recent version of Tamino, so I can try it.
Thank you again for your answer.
You might want to check out Ronald Bourret’s web pages regarding XML DBMS. I think there are links to discussions about when to use RDMS and when to use XML DBMS.
I will follow your suggestion.
Thank you again.