Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. Multiple database support

Multiple database support

Scheduled Pinned Locked Moved Design and Architecture
databasesql-serveroracledesignsysadmin
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Atul Kharecha
    wrote on last edited by
    #1

    Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.

    G U J 5 Replies Last reply
    0
    • A Atul Kharecha

      Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      Colin Angus Mackay has nice series about building DAL that supports multiple databases. Swithing from one database to another is a matter of changing configuration file so you don't need to recompile application. You can find the first part here: What is a DAL? [^]

      Giorgi Dalakishvili #region signature My Articles / My Latest Article[^] / My blog[^] #endregion

      1 Reply Last reply
      0
      • A Atul Kharecha

        Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.

        U Offline
        U Offline
        Urs Enzler
        wrote on last edited by
        #3

        With most OR mappers this is a change in the configuration file. Yes, yes I know, if you have performance optimizations in your code, then it's not that easy ;)

        -^-^-^-^-^-^-^- no risk no funk

        1 Reply Last reply
        0
        • A Atul Kharecha

          Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.

          G Offline
          G Offline
          Giorgi Dalakishvili
          wrote on last edited by
          #4

          Here is an article that shows how you can do it: Provider Design Patterns in NET 2.0[^]

          Giorgi Dalakishvili #region signature My Articles / My Latest Article[^] / My blog[^]

          1 Reply Last reply
          0
          • A Atul Kharecha

            Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.

            J Offline
            J Offline
            Jessn
            wrote on last edited by
            #5

            heyitsAtul wrote:

            Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.

            It can be done in several ways. First of all you need to have an abstraction layer. That layer needs to be a generic layer that matches the interface for both databases. Secondarily, I'll recommend that use a factory. Try to take a look at the following link for inspiration Connection pool[^] Hth

            -- Jess Nielsen, b.sc. Security Analyst http://jessn.blogspot.com/

            1 Reply Last reply
            0
            • A Atul Kharecha

              Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.

              J Offline
              J Offline
              Jessn
              wrote on last edited by
              #6

              heyitsAtul wrote:

              Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.

              It can be done in several ways. First of all you need to have an abstraction layer. That layer needs to be a generic layer that matches the interface for both databases. Secondly, I'll recommend that use a factory. Try to take a look at the following link for inspiration: Connection pool[^] HTH

              -- Jess Nielsen, b.sc. Security Analyst http://jessn.blogspot.com/

              modified on Monday, November 8, 2010 3:20 AM

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups