Connectivity to SQL Server, Oracle & MySQL

  • Hi All,

    I have an application running on .Net. I have a task to identity how can this application connected to various databases like SQL Server, Oracle & MySQL. The users will choose the databases depending upon their environment. I'm in the process of creating the database layers for connecting to front end application.

    The databases objects I have currently in SQL Server are stored procedures, functions, types & views. Now, I have also need to convert these objects to Oracle & MySQL.

    Any suggestions are welcome.

    Thanks,

    RJ

  • [font="Verdana"]

    Raghu (4/5/2008)


    Hi All,

    I have an application running on .Net. I have a task to identity how can this application connected to various databases like SQL Server, Oracle & MySQL. The users will choose the databases depending upon their environment. I'm in the process of creating the database layers for connecting to front end application.

    The databases objects I have currently in SQL Server are stored procedures, functions, types & views. Now, I have also need to convert these objects to Oracle & MySQL.

    Any suggestions are welcome.

    Thanks,

    RJ

    Raghu, It is not that easy, converting such objects from one DB to another, as you are thinking. You need to create objects individually in each DB.

    By the way, really I am not getting, why DB Selection option is given to the user? What if two different users, from the same oranization, wants to choose, rather wants to work on two different DBs, i.e. Oracle & SQL Server? One will select Oracle environment and start workinig. Simultaniously another user would have been selected SQL Server. It does not make any sense.

    Please explain in detail, so that we can dig around.

    Thanks,

    Mahesh[/font]

    MH-09-AM-8694

  • Check out the Microsoft Patterns and Practices Enterprise Library.

    http://msdn2.microsoft.com/en-us/library/aa480453.aspx

    The Data Access Application Block is what you want to look at.

    I used it once in an earlier version and it abstracts the database used to the point when you can set a configuration option and you will be connected to any database you have a provider for.

  • [font="Verdana"]

    Bob Crowley (4/7/2008)


    Check out the Microsoft Patterns and Practices Enterprise Library.

    http://msdn2.microsoft.com/en-us/library/aa480453.aspx

    The Data Access Application Block is what you want to look at.

    I used it once in an earlier version and it abstracts the database used to the point when you can set a configuration option and you will be connected to any database you have a provider for.

    But Bob, how feasible this will be working on two different DBs through a single application? How the DBA is going to maintain such stuff? (May be this can, but I am unaware with this.) Or is it something like Inserting data in one DB through application and then importing the whole data from one DB to another DB and finally using the another DB for further processing?(May be I am going wrong. Correct me.)

    Even I have gone through the url mentioned. Through this, only I could understand is that, in .Net you have configuration setting through which you can connect multiple DBs.

    Can you please explain the stuff in detail?

    Thanks in advance,

    Mahesh

    [/font]

    MH-09-AM-8694

  • Sounds like you need to keep the data in these separate databases in sync? That is possible but it would be a nightmare and I am not the person to advise you on how to do it.

    I had the impression that everyone using the same data would have the same database and other, unrelated installations, could choose a different one.

    If it is at all possible to force the choice of databases, I'd say pick one and go with it.

  • Hi Mahesh, Bob,

    First, I appreciate replying to this post. The reason for different databases are:

    1. This is a product which an organization who decide to use will select a database system (sql server, oracle, mysql) to use at the backend but the front end would be in .Net application (c#). In an organization they will be using only one database system everywhere.

    2. Bob, As per the conversation I see you say directly converting all existing sql server objects to oracle & mysql wouldn't be a easy step rather we should dig into modifying the procedures, data types & functions manually?

    Thanks

  • Raghu (4/9/2008)


    Hi Mahesh, Bob,

    First, I appreciate replying to this post. The reason for different databases are:

    1. This is a product which an organization who decide to use will select a database system (sql server, oracle, mysql) to use at the backend but the front end would be in .Net application (c#). In an organization they will be using only one database system everywhere.

    2. Bob, As per the conversation I see you say directly converting all existing sql server objects to oracle & mysql wouldn't be a easy step rather we should dig into modifying the procedures, data types & functions manually?

    Thanks

    Besides the conversion itself - you have the performance question. Meaning - just because something ports over correctly doesn't mean it's going to perform well at all. From my admittedly limited exposure to Oracle, the two database engines like their SQL coded in rather different ways, so code built for one and ported over "as is" will tend to perform poorly (at least until someone comes along and tunes it, adjusts the SQL, etc...) .

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Hall of fame is correct. unless there is a secret that I do not know, you will also will have to take care of the developmet on the front end, that means the way you call the procedures, views and so on...

    you will have to make the decision on which environment you are going to be running on the onset and then proceed from there.

    "We never plan to Fail, We just fail to plan":)

  • DO you think this: System.Data.Common Namespace is workable?

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply