|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
database driven websites. Discuss
I am going to change my site so that it is database driven. I'm not sure how far to take it. How much of it should be database driven?
I was planning to make it 100% so that every link, image files, meta tags, page titles etc are all stored in the database. Is this wise or practical? |
|
#2
|
|||
|
|||
|
RE: database driven websites. Discuss
Well, it really depends on a lot of things.
The first is the content of your site, some sites fit better to databases (e.g. shops), some don't (designer sites). The second thing to consider is performance. Every query takes some time and if you need 190 queries to produce a single page, you'll have a very unhappy server. I'd seriously advise against storing images in the db - an average page has from 10-50 images on it, so you'll have as many calls to the PHP executor, as many queries, and the image data will first have to be read from disk to dbase, from dbase to php, from php to php once or twice, and finally from php to web server. Obviously this isn't a very efficient way to do it. Third is practicality. For every thing you'll have in the dbase, you'll need to code an admin tool, and use it. If you have every little thing in the dbase, you need to spend a lot of time editing it (assuming your site changes often enough) and sometimes it's just faster/easier to simply edit the relevant .php file. |
|
#3
|
|||
|
|||
|
RE: database driven websites. Discuss
store the content that changes often, the content that have much in common.. what is your site about? give more detailed description or url.. you can store image refs or image files in DB if you have a site for free greeting cards for example.. to store everything in DB make sense if you have templates in which you show that content, if you want to perform searches, sorting etc.. if you think that this will make your life easier make database driven website ;)
|
|
#4
|
||||
|
||||
|
RE: database driven websites. Discuss
Storing page titles in a database is a bad idea in my opinion. Unless the title changes frequently. What i would do to form page titles is get the name of the page file and remove the extension but this relies on the file having the same name as the page. Also like said above storing many images in a DB will dramatically slow down your server/site so its a bad idea however you could store a link to an image in the db and it wouldnt be a problem.
|
|
#5
|
|||
|
|||
|
Message Moved
Thread moved from 'PHP Coding' to 'Programming Theory' by CodeKadiya.
Reason: Not coding help! Thoery.. |
|
#6
|
|||
|
|||
|
RE: database driven websites. Discuss
My intention is to store a reference to image files rather than the file itself. Will this effect performance?
The site is a 'shop' so product prices etc change frequently. My concern is how a site, 100% database driven will effect search engines listings? If the pages are dynamically created, therefore do not exist on the server, how will the robots find them when they come a visiting? |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Programming Theory > database driven websites. Discuss |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|