Hi everyone:<br><br>I've uploaded a file to my web page with a c# project testing NHibernate: <a href="http://ai-designstudio.net/index.php?option=com_docman&task=doc_details&gid=40&Itemid=88889037&lang=en">http://ai-designstudio.net/index.php?option=com_docman&task=doc_details&gid=40&Itemid=88889037&lang=en</a><br>
<br>Please, does not expect a miracle right now, it's just only a massive insertion test for checking if everything runs ok.<br><br>The zip includes a VC#.NET project and a sql file for MySql (I haven't time to translate ALL the "model" I used to mssql and sqlite). Check the file hibernate.cfg.xml and substitute dbName, user and password.<br>
<br>The project does a raw insert of 100 registers into 4 tables. 3 tables have relationships between them (Expressed in "object words", there are 3 clases with objects inside. Hibernate does automatically the selects to get the registers, we only work with OBJECTS). The full proccess took less than 1 second. I have tested it both in mono and .NET. Ah!!! I was not sure about BLOB fields, but seems to work ok. I've tested too 10000 insertions (converted in 50000 due to the model), it took 1:30 minutes, not too bad.<br>
<br>This evening, at work, I could try insertions in mssql and sqlite, just changing the parameters of hibernate.cfg.xml (I hope tomorrow could have a better example with those databases). If someone wants to test against this dbs, just uncomment the lines indicated and comment the rest.<br>
<br>What we gain with this:<br>- DB independence (even Oracle, postgresql, Access, etc. could be used).<br>- Only the DB module has to know the mappings, the rest of the model will just use the objects provided.<br>- Transaction management (increases security).<br>
- (This one may be interesting) The objects provided could be serialized for transmitting info between servers or for import/export.<br>- Using hbm2ddl NHibernate can create automatically the tables. We doesn't need more *sql files for every db.<br>
<br><br>And the TODO list (both for me and for the rest of the team):<br>- Check timing with selects and, overall, selects in objects with relationships (in Java it uses to be slow sometimes if the db model is not optimized; slow is around 1 second using several JOINS)<br>
- Investigate a way to configure without the xml attached to every mapped object. There is a NHibernate extension to do that with attributes (like the Java anotations I use everyday) but I haven't tested it yet.<br>- How to put everything into OpenSim without affecting the rest of the modules. I don't know OS enough to do this alone.<br>
- For the next future: if everything works ok with NHibernate, OS, and the actual db model, create a more eficient and normalized db model.<br><br>Well, that's all folks.<br><br>Greetingzzz<br><br><br><br><br>