minitwit
minitwit copied to clipboard
Ask for help
How can i change the HSQLBD with orientdb Graph ? Thank you
Hi @messaoudmoha,
I can't help you much because I don't know about graph databases. Well, I read a little bit on its website and I see that is like a hybrid document database that can connect documents like a relational database, so I don't know for sure if a direct mapping (user table -> user document) could work.
What I can tell you is that:
- You can find the structure of this application's database in
src/main/resources/sql. - You will have to add the driver for the OrientedDB database.
- You will have to change the implementation of
com/minitwit/dao/impl/MessageDaoImpl.javaandcom/minitwit/dao/impl/UserDaoImpl.javaso the methods of those DAOs can work with OrientDB without breaking the interface contract (if a method returns a list ofUserobjects, somehow the new implementation has to return it too). - You will have to change the
dataSource()method ofcom/minitwit/config/DatabaseConfig.javaso it returns a data source to an OrientDB database.
Sorry, I cannot help you with more implementation details because I don't know this database, but let me know if this helps you.