PostgreSQL vs MySQL

Discussion in 'Site & Server Administration' started by sharpweb, Jul 10, 2006.

  1. #1
    I have a hosting account set up with 8 available databases in PostgreSQL and another 8 in MySQL. I have now used all 8 mySQL databases on various projects. I now need another database. My two options are to use a PostgreSQL database or just add more tables to one of the mysql databases.

    I'm a little wary of using the PostgreSQL databases because i have lots of existing code that uses mysql connect and result functions in php. I don't want to have to rewrite it nor do I know how to connect to a PostgreSQL database?

    Any ideas on what I should do?
     
    sharpweb, Jul 10, 2006 IP
  2. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #2
    PHP hooks up to PostGreSQL as easily as it does to MySQL. Almost all of your queries will probably work as well.

    You could also ask your host to enable more databases. It's a silly artificial limit anyway, if you have any sort of 'relationship' with them besides just paying the bills on time, they should be able to bump that up for you.
     
    T0PS3O, Jul 10, 2006 IP
  3. forkqueue

    forkqueue Guest

    Messages:
    401
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you're using a database abstraction layer such as MDB2 then switching to Postgres should be easy.

    If you're not - now seems a good time to start :D
     
    forkqueue, Jul 10, 2006 IP