Hi there,
I'm building a website that allows users to create a profile which is then available for other users to view and search.
The profile is mainly informatory rather than social.
I am wondering whether the best way to go about it is to crate a mysql database to store all the information and use php to then generate the user page when it is called.
Any thoughts on the matter and any suggestions would be much appreciated.
Thanks!
database choice
Moderator: General Moderators
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: database choice
Yes Definitelyo12357 wrote:mysql database to store all the information and use php to then generate the user page when it is called.
Re: database choice
which one is the best database for php?
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Re: database choice
It depends on lots of things. Generally, I would go for either MySQL or PostgeSQL because they're open-source and free. Choosing between those two is largley a matter of taste and/or previous experience.johnbrayn wrote:which one is the best database for php?
Re: database choice
Without wishing to go all technical, actually MySQL (or any RDBMS) is not the ideal solution for a website as the original poster described. MySQL is good at storing data that relates to other bits of data. In a site where you're storing records that aren't related you're better off with a key value data store like MemCache, Map, C-Tree, or even just a flat file storage like SQLite3. Use the database for recording things that will need to be updated, and for searching, but 'bake' the profile information into static HTML files or templates for display. It'd be considerably faster and more resource friendly.
But.. it'd also be much more complicated to write. If you're not an experienced developer you're better off just sticking with MySQL.
But.. it'd also be much more complicated to write. If you're not an experienced developer you're better off just sticking with MySQL.
Re: database choice
thanks all for your replies. sorry took so long to thank you. been away.
onion 2k, i would appreciate if you could elaborate on your suggestion. i thought of using mysql for login info only and writing a php script that would generate a seperate static html page for each user profile from the form used to generate the profile. is that a good idea? and is it anywhere near what you suggested?
thanks!
onion 2k, i would appreciate if you could elaborate on your suggestion. i thought of using mysql for login info only and writing a php script that would generate a seperate static html page for each user profile from the form used to generate the profile. is that a good idea? and is it anywhere near what you suggested?
thanks!