I simply requested here if there is an over-all method of getting tables names and produced tables on the database.
I want this because my application connects to some database and it has some fundamental database edition functionality like creating tables having a wizard. However I would like the consumer to have the ability to choose from a variety of possible database engines (at this time it just uses the Jet engine).
Many people explained it was difficult which I will have to create an abstract layer with implementations for every database engine. However I just found NHibernate also it appears in my experience it creates SQL queries for an array of database engine (I am unsure when the Jet engine is incorporated). So my real question is, can one use NHibernate to do this?
You actually can, as lengthy because the database schema is identical over the different databases.
Here's a listing of database engines based on NHibernate (including Microsoft Jet) and also the configuration configurations needed to be able to use them:
However remember that the amount of support for that different database engines can vary, so make certain you research any known issues NHibernate might have using the specific database you will use.
NHiberate can help you by helping cover their the multi db a part of your condition. The actual challenge may be the editing of tables.
I've done something such as what you would like with NHibernate, however the functionality is tricky to implement and nearly impossible to find right.
Because NHibernate is definitely an ORM you need a category to load the information into so you will have to emit a category first. You will want to develop a mapping file to map the db posts towards the released classes qualities. After that you can uses the produced mapping file and the rest of the mapping files that the application must produce the
Configuration. Finally you should use the schema export functionality of NH to create the brand new table.
When I stated tricky and never easy, bit possible.