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. Database & SysAdmin
  3. Database
  4. Postgres 9.1 and C# app

Postgres 9.1 and C# app

Scheduled Pinned Locked Moved Database
questioncsharpcssdatabasepostgresql
7 Posts 3 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
    Aleonis
    wrote on last edited by
    #1

    Hello! I`m creating an application that using Postgres 9.1, a powerful database, steps on toes of the mighty Oracle. I can`t use Oracle because of it`s price, while Postgres is free and popular. (Microsoft ones are less powerful...) My question is quite common: How to connect database and C# application? Is there any other way (besides Npgsql lib?)around it? I`m using VS2010 to create application now. Thank you.

    B 1 Reply Last reply
    0
    • A Aleonis

      Hello! I`m creating an application that using Postgres 9.1, a powerful database, steps on toes of the mighty Oracle. I can`t use Oracle because of it`s price, while Postgres is free and popular. (Microsoft ones are less powerful...) My question is quite common: How to connect database and C# application? Is there any other way (besides Npgsql lib?)around it? I`m using VS2010 to create application now. Thank you.

      B Offline
      B Offline
      Bernhard Hiller
      wrote on last edited by
      #2

      Sometime ago, I connected my application to a postgres database for test purposes. I used Npgsql, it works. I guess ODBC could also be possible, but ODBC is normally not recommended when you can use a specific connection tool (better performance, specific datatypes). By the way, there are free versions of Oracle available. And during my tests, I found Microsoft SQL Server and Oracle to provide higher performance than postgres (and postgres had higher performance than MySQL), especially when using JOINs with sub queries.

      A 1 Reply Last reply
      0
      • B Bernhard Hiller

        Sometime ago, I connected my application to a postgres database for test purposes. I used Npgsql, it works. I guess ODBC could also be possible, but ODBC is normally not recommended when you can use a specific connection tool (better performance, specific datatypes). By the way, there are free versions of Oracle available. And during my tests, I found Microsoft SQL Server and Oracle to provide higher performance than postgres (and postgres had higher performance than MySQL), especially when using JOINs with sub queries.

        A Offline
        A Offline
        Aleonis
        wrote on last edited by
        #3

        Thank you for answer Bernard! Well, my application is going to be sold, so i don`t want for my employer to ask me "What a ...." So, because Postgres is free for commercial usage (yes, there is a paid edition too, with minor benefits.) and has a quite a lot of data about it. (Most of the users favour linux for some strange reason...") Oracle... well, it`s size is far larger than Postgres`s ~100mb and the target database itself is several GB`s, Oracle can handle this, without question, but it`s main role is huge enterprise databases of large companies. I`ve read article on Oracle vs SQL and author shown two pictures: Oracle - Swiss Army Knife, SQL - pink assault rifle toy for kids. SQL is bad work of Microsoft, more errors per code then in Oracle and Postgres, lower perfomance as well.

        M 1 Reply Last reply
        0
        • A Aleonis

          Thank you for answer Bernard! Well, my application is going to be sold, so i don`t want for my employer to ask me "What a ...." So, because Postgres is free for commercial usage (yes, there is a paid edition too, with minor benefits.) and has a quite a lot of data about it. (Most of the users favour linux for some strange reason...") Oracle... well, it`s size is far larger than Postgres`s ~100mb and the target database itself is several GB`s, Oracle can handle this, without question, but it`s main role is huge enterprise databases of large companies. I`ve read article on Oracle vs SQL and author shown two pictures: Oracle - Swiss Army Knife, SQL - pink assault rifle toy for kids. SQL is bad work of Microsoft, more errors per code then in Oracle and Postgres, lower perfomance as well.

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          While I will allow the lower performance in Oracle vs SQL Server I would dispute the Swiss/pink comparison. If you are doing anything less that enterprise level database work SQL Server is by far the best (paid) solution. If you can work under 4gb in database size then SQL Server Express is the best "free" solution for your requirements. Oracle is without doubt the workhorse of databases whereas SQL server is what I call a departmental database. In that area it is the absolute best solution bar none. It has the widest support base of any database, performance is excellent in anything less than enterprise (multi million row tables). Development tools have any other IDE for breakfast (TOAD is a pile of complex crap b/c is designed to sit over Oracle). If you are expecting to have less than 4gb of data then I would recommend SQL Server Express, if it is greater then I would look very closely at the support resources for the database you choose to use.

          Never underestimate the power of human stupidity RAH

          A 1 Reply Last reply
          0
          • M Mycroft Holmes

            While I will allow the lower performance in Oracle vs SQL Server I would dispute the Swiss/pink comparison. If you are doing anything less that enterprise level database work SQL Server is by far the best (paid) solution. If you can work under 4gb in database size then SQL Server Express is the best "free" solution for your requirements. Oracle is without doubt the workhorse of databases whereas SQL server is what I call a departmental database. In that area it is the absolute best solution bar none. It has the widest support base of any database, performance is excellent in anything less than enterprise (multi million row tables). Development tools have any other IDE for breakfast (TOAD is a pile of complex crap b/c is designed to sit over Oracle). If you are expecting to have less than 4gb of data then I would recommend SQL Server Express, if it is greater then I would look very closely at the support resources for the database you choose to use.

            Never underestimate the power of human stupidity RAH

            A Offline
            A Offline
            Aleonis
            wrote on last edited by
            #5

            Hello Mycroft Holmes! I agree on Oracle. SQL Server Express is nice solution, but it`s paid (if DB is larger than 4GB) and this is the main problem (Current DB is 3.96 GB and expanding...). I was tasked to create app that require close to zero cash on any 3rd party components (It was, it is and it`ll be - employer always looking for something that would cost 0$ and be as functional, stable and reliable as hell) So Postgres is a necessary option because it`s free.

            M 1 Reply Last reply
            0
            • A Aleonis

              Hello Mycroft Holmes! I agree on Oracle. SQL Server Express is nice solution, but it`s paid (if DB is larger than 4GB) and this is the main problem (Current DB is 3.96 GB and expanding...). I was tasked to create app that require close to zero cash on any 3rd party components (It was, it is and it`ll be - employer always looking for something that would cost 0$ and be as functional, stable and reliable as hell) So Postgres is a necessary option because it`s free.

              M Offline
              M Offline
              Mycroft Holmes
              wrote on last edited by
              #6

              Aleonis wrote:

              employer always looking for something that would cost 0$ and be as functional

              And yet it may end up costing substantial amounts in down stream support. This is something most organisations do not consider and it is well known that support cost are more than development costs! Still I would hate to lose all the options like postgres so I hope it works and works well and it does sound like it is the right tool for your job.

              Never underestimate the power of human stupidity RAH

              A 1 Reply Last reply
              0
              • M Mycroft Holmes

                Aleonis wrote:

                employer always looking for something that would cost 0$ and be as functional

                And yet it may end up costing substantial amounts in down stream support. This is something most organisations do not consider and it is well known that support cost are more than development costs! Still I would hate to lose all the options like postgres so I hope it works and works well and it does sound like it is the right tool for your job.

                Never underestimate the power of human stupidity RAH

                A Offline
                A Offline
                Aleonis
                wrote on last edited by
                #7

                Yeah, it`s like you work as a lead producer in EA and suddenly someone bestows upon you a free Aston Martin DBS... While car is yours for free, it`s repairs, fuel, taxes and other cash drains will become a great burden & start drain your budget. Free gift becoming surgical strike at the company`s budget.

                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