Discussion in 'Scripts, 3rd Party Apps, and Programming' started by Kurai Kumo, Feb 6, 2005.
Which is better?
never used postgresql, always used MySQL, most hosts dont allow postgre
i was just wondering
Now that PostgreSQL has finaly come to windows I can start looking at it.
At the moment I use MySQL exclusively but I have been watching postgre it looks good.
what's the difference?
To be honest I don't know that much about the inner workings of databases (db). From what I gather it all has to do with the functions in the databse software, mysql is behind the bigger dbs but its more wide spread then other db.
That what I think maybe someone has a better explanation
MySQL has been around for longer -and its php support is fully working and easy to use. Most scripts have support for just mysql, but some larger scripts (Such as forums) can support multiple database types - such as, MSSQL (Microsoft SQL Server) MySQL, PostgreSQL, Oracle, etcetera.
Firstly this thread is almost a year old.
As for MySQL is not older, PostgreSQL dats back to 1985. Many of the features that have been in Postgres have only just made it into MySQL 5.
btw cPanel don't wan't to fix Postgres support hence we don't offer it although I wish we could.
Post is now 3 years old. Just an addition to Richard's statement. PostgreSQL used to be something called Ingres. The project after Ingres (Post), so it was to be called PostIngres, but they combined it to make Postgres. They were going to keep it at Postgres, but to address the SQL functionality and similarities to MySQL, they attached the SQL part: PostgreSQL is the actual name and spelling.
I want it installed here. It is probably the best open-sourced database there is and stronger than MySQL.
Performance Slower Faster
Sub-selects Yes No
Transactions Yes Yes, however InnoDB!
Database replication Yes Yes
Foreign key support Yes No
Views Yes No
Stored procedures Yes No
Triggers Yes No
Unions Yes No
Full joins Yes No
Constraints Yes No
Windows support Yes Yes
Vacuum (cleanup) Yes No
ODBC Yes Yes
JDBC Yes Yes
Different table types No Yes
When to use MySQL
Why would you use MySQL over PostgreSQL? First, we need to consider the needs of the applications in terms of database requirements. If I want to create a Web application and performance is an issue, MySQL will be my choice because it’s fast and designed to work well with Web-based servers. However, if I want to create another application that demands transactions and foreign key references, PostgreSQL is the choice.
As an open source developer, I work with both databases on a regular basis, and I typically use all the features of a given database in the design and development process. It wouldn’t suffice for me to use PostgreSQL for a database-driven Web site when my application requires performance.
Even though MySQL is not fully compliant with the ANSI SQL standard, I should mention that, while PostgreSQL is closer to the ANSI SQL standard, MySQL is closer to the ODBC standard.
Let me suggest some reasons for using MySQL over PostgreSQL:
* MySQL is relatively faster than PostgreSQL.
* Database design will be simpler.
* You can create a basic Web-driven Web site.
* MySQL’s replication has been thoroughly tested.
* There’s no need for cleanups in MySQL (Vacuum).
When to use PostgreSQL
Not many Web developers use PostgreSQL because they feel that the additional features degrade performance. The article "Many Web developers prefer MySQL" offers a glimpse into the mentality of Web developers and their reasons for using MySQL. However, PostgreSQL offers many advantages over MySQL.
For example, some of the features I use are foreign key references, triggers, and views. They allow me to hide the complexity of the database from the application, thus avoiding the creation of complicated SQL commands. I know many developers who prefer the rich functionality of PostgreSQL’s SQL commands. One of the most notable differences between MySQL and PostgreSQL is the fact that you can’t do nested subqueries of subselects in MySQL. PostgreSQL follows many of the SQL ANSI standards, thus allowing the creation of complex SQL commands.
Let me suggest some reasons for using PostgreSQL over MySQL:
* Complex database design
* Moving away from Oracle, Sybase, or MSSQL
* Complex rule sets (i.e., business rules)
* Use of procedural languages on the server
* Use of stored procedures
* Use of geographical data
* R-Trees (i.e., used on indexes)
When to use both
You’ll have to choose which database is “perfect” for your application or Web site. And you may want to use both. I recently worked for the Quality Assurance Department for Enterasys Networks. One of my responsibilities was to create a database-driven intranet site as a repository for all the QA testing done at our facility. From the outset, I was convinced that PostgreSQL was the only database to use. I was wrong. I ended up using both databases for the intranet site. I used MySQL to handle the entire Web front-end and PostgreSQL to keep track of all the testing metrics that we stored. I found that MySQL and PostgreSQL helped in their own ways. My conclusion is that one isn't necessarily better than the other, but that each one has its place in the world of open source databases.
sorry the table are messed up which i didnt expect see the original source in my site PostgreSql Vs. MySql
hope this would end your dilemma.
balaji2u - That was some good information. And I liked that last bit about developing a system that ended up using both MySQL and PostgreSQL. They each have their strengths. I personally prefer PostgreSQL as integrity, reliability, and scalability are the most important to me. I come from years of using Oracle.
Most recent post is over 1 year old--we didn't need this thread revived. Also, table is out of date; MySQL has many of the features that the table claims it doesn't have.
Separate names with a comma.