# February 4, 2013 at 11:35 pm
So I’m a college student attending Niagara College for general arts and science and going to be starting the New Media Web Design program in September. I’m trying to take a few courses from the program early to reduce my course load for next year, I’m taking a Database course and we just finished learning create, insert, delete and update for MySQL and I was shy to ask my professor how databases could be used for websites? I am aware that wordpress uses databases, but on any other type of site, how could they be used? could you use them for images and call them from there? how would you store images? I’m curious to know how they work and databases would function for websites? and are they still commonly used?
another thing I heard (but not sure how accurate) is that people want to bring xml back because of the ease of use to edit ..# February 5, 2013 at 1:37 am
Any kind of website that has a member login system will need a database.
As for your specific example, what I’ve seen done more is to store the image *path* in the database but store the images in a folder on your server that the database simply references. But I’ve only worked with databases on very large sites where saving the image in the actual database was not practical, so others might do this differently.
And you shouldn’t be afraid to ask questions of your professors – otherwise what’s the point of going to school? It’s probably that more than one person has the same question as you. :)# February 5, 2013 at 9:53 am
Let’s say I create a small landing site with three fields:
-Would you like our newsletter?
Entering these three and clicking the “Send” button they are immediately elegible for a raffle.
The best way to store this data, so all the personal information I need to contact the winner is available (and later add the e-mails to a newsletter database) is to… bam… create a table with 5 columns within my database.
The 5 columns would be:
– An autoincrement one with an ID (so the raffle is imparcial and I can choose one just picking a random number with PHP or other),
– newsletter or not and
– the date when this data was submitted.
This is the simplest case ever, but I hope you got my point
You must be logged in to reply to this topic.