Domain Model

Thread is closed for posting
2 posts, 0 answers
  1. Varghese
    Varghese avatar
    25 posts
    Member since:
    May 2011

    Posted 07 Sep 2011 Link to this post

    I have two databases with entirely different schema but both serve the same business vision. One is MsSql based and the other is MySql based. For example, there is an employee table. They exist in both the databases but with different schemas. I don't have to make two different UI because for the end user because the data come from both the databases are the same.

    I'm looking at leveraging OpenAccess for this project. I have few questions which someone can answer:

    1. I dont want to create any new stored procedures. Does the inline sql queries make the data access layer slow with OpenAccess?

    2. Because I have two database backends, I have to create two different dataaccess layers - one for mssql and the other one for mysql. That looks ugly. Can I have just one data access layer with OpenAccess and divert the queries to mssql db or mysql db. The client will tell what database has to be used.

    3. Can I create just a domain model with OpenAccess and keep the data access layer seperate? This may be better design because I have a domain and the UI can work on that domain. I assume OpenAccess needs a database as a start.

    I appreciate the feedback.

  2. Alexander
    Alexander avatar
    727 posts

    Posted 08 Sep 2011 Link to this post

    Hello Varghese,

    1. There should be no visible difference in the performance. OpenAccess caches the generated sql statements, so if the same query is executed multiple times (even with different parameters) it would not be calculated again. If you experience any performance issues with your application, just write to us - perhaps there would be a way to optimize the performance.

    2. At the moment there is no way for an OpenAccess domain model to store the database schema for more than one database schema. This functionality is on our list for the next major release or (at latest) the one after. I am afraid until then you will have to maintain two domain models for the two databases.

    3. I guess you can implement some kind of an abstraction between your domain models and the business logic which handles the data access operations. This way you will be able to more easily substitute the two models with single one once we implement the multi-backend support.

    I hope that helps for a start, feel free to contact us for further assistance.

    Best wishes,
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's SQL Server Community Awards. We are competing in TWO categories and every vote counts! VOTE for Telerik NOW >>

Back to Top