Hi folks,
Please excuse the off-topic post. I thought I'd ask this question in rec.crafts.metalworking because there are some smart people here.
I need a database for a major website project. Eventually it'll grow to be a large database, probably gigabytes in size. It needs to be straightforward to build a web-based interface for the database. Probably using PHP, as I'm familiar with PHP and don't fancy learning Perl right now.
Data integrity is more important to me than speed, although speed is not unimportant. I don't want to have to spend time restoring a corrupted database from back-ups. The database will be modified frequently, i.e., there will be substantial write activity as well as read activity.
I can't afford to pay for a commercial database system like Oracle. It needs to be free software. It also needs to run on a Unix or Linux server of some kind. I don't want to use a Windows server for several different reasons.
I've come to the conclusion that there are two serious contenders: MySQL and PostgreSQL. I get the impression that MySQL interfaces with the web slightly better than PostgreSQL, but that PostgreSQL has a better reputation for data integrity and a more precise philosophy behind it. PostgreSQL also appears to have a wider range of advanced functions, such as approximate string matching, which may be useful to me. As far as I can see, the initial set-up costs for the two systems are similar. Right now, I'm tending towards PostgreSQL, but I'd really like to hear from some knowledgeable people. Can anyone make a recommendation based on experience?
I could also do with having a book which explains best practice in database design. Particularly how to structure a database for best performance. Intuitively I feel that if I have many different types of data, it will be best to have one table for each type of data, rather than having several types of data in a single table. That way, when I go to retrieve a particular kind of data, the server won't have to do any sorting. It can just get everything from a single table. But I'm not sure if there are disadvantages to having a great many tables. This is where a good book would be useful. Can anyone recommend such a book?
I have a small amount of experience of using SQL Server, and much more substantial experience of PHP, Apache and various versions of the Solaris SPARC operating system.
Any thoughts on the subject would be much appreciated.
Many thanks,
Chris Tidy