Building a database based website...novice questions

Building a database based website...novice questions

Author
Discussion

LeeME3

Original Poster:

1,502 posts

227 months

Monday 20th August 2007
quotequote all
So, I can 'do' the HTML thing to a basic standard that means I can build acceptable but basic websites. Now I want to have more control over the content and I think I need to go down the database/SQL route but don't know much about it.

We've got a family website that links about 50 folk all over the world and is mainly used for posting photos. At the moment everyone emails me the pics and I upload them using a simple pic hosting format.

What I want to do is give the users the ability to upload the pics themselves complete with a few data fields for each (date, location, description etc). I envisage a simple form for entering the data then a simple 'browse' to find the target pic on the user's PC at which point the data and pic upload into a database. A summary of all pics is then created automatically so that other users can search the database and retrieve info from it.

I know there are packages/hosting services out there that will provide all of this for me, but I prefer to develop my development skills...

Having 'googled' it, I think I need to build the framework of the database and control it from SQL, but any advice, including how long SQL takes to learn (can I do it online, is it best to go on a short/long course).... any pointers/examples gratefully received...

davidd

6,452 posts

285 months

Monday 20th August 2007
quotequote all
Can you not do all this with gallery or coppermine?

D

LeeME3

Original Poster:

1,502 posts

227 months

Monday 20th August 2007
quotequote all
davidd said:
Can you not do all this with gallery or coppermine?

D
I could, but I prefer to do it myself so as I acquire the skill - which essentially means I guess I'm going to create my own 'CopperMine' albeit with a more limited option set.

The Griffalo

72,857 posts

240 months

Monday 20th August 2007
quotequote all
If you're determined to go down the database route I'd suggest using MySQL and PHP as they're free biggrin

Don

28,377 posts

285 months

Monday 20th August 2007
quotequote all
Well. You certainly don't lack ambition.

First you need a development environment. Choose one. PHP/MySQL. ASP/MSDE. ASP.NET/SQLExpress. THen go buy the books. You'll need two. One on the scripting language and one on the database you choose. If you are lucky you might find a targetted book on both things together. Also buy a book on JavaScript for the client side.

Read all the books. DO the exercises in each one. Along the way you'll learn enough to do the task you want. I can also advise Googling up free code you can cut and paste into your application. Once you've read the books you'll have an idea what to Google for.

If you dedicate your evenings to it I reckon a few months should get you the skills you require. If you ENJOY doing it you might just have found a new vocation.

Good luck.

LeeME3

Original Poster:

1,502 posts

227 months

Monday 20th August 2007
quotequote all
Thanks guys, I don't mind putting time into it as I live away from home in the week and so I have to find stuff to do to keep me out of the pub!

I do have a degree in Computer Science but it's from the early 90s so whilst I am comfortable with coding it's been a while and the stuff we were doing then is not directly comparable to today's PC and internet environment - we thought JANET (Joint Academic Network) was cool as you could send electronic mail messages!!! Didn't even call them e-mails then!

Not too bothered if it takes me a few months, although it's always nice to get to a useable standard before the end of the slog. Looks like PHP/MySQL is the way to go at this stage - is there any limit to the size of database they can handle or is that pretty much completely irrelevant?

Also, really daft question, will the database itself be stored within my 'webspace' (I use fasthosts for hosting) and therefore count against my total space allocation or can I keep it on my home PC (accepting of course that it will then ned to be online 24/7 for people to access it)?

hawkaye

4,505 posts

212 months

Monday 20th August 2007
quotequote all
once you have your database set up, get modx, this is an excellent free open source content management system. It comes with an installation script which sets up your database for you, very easy to use if you are new to php/mysql.

Don

28,377 posts

285 months

Monday 20th August 2007
quotequote all
LeeME3 said:
Thanks guys, I don't mind putting time into it as I live away from home in the week and so I have to find stuff to do to keep me out of the pub!

I do have a degree in Computer Science but it's from the early 90s so whilst I am comfortable with coding it's been a while and the stuff we were doing then is not directly comparable to today's PC and internet environment - we thought JANET (Joint Academic Network) was cool as you could send electronic mail messages!!! Didn't even call them e-mails then!

Not too bothered if it takes me a few months, although it's always nice to get to a useable standard before the end of the slog. Looks like PHP/MySQL is the way to go at this stage - is there any limit to the size of database they can handle or is that pretty much completely irrelevant?

Also, really daft question, will the database itself be stored within my 'webspace' (I use fasthosts for hosting) and therefore count against my total space allocation or can I keep it on my home PC (accepting of course that it will then ned to be online 24/7 for people to access it)?
I don't even have a Comp Sci degree, mate. Mine was in "Systems Analysis" and from the 80s! You'll be fine.

As to hosting: you will need to negotiate with your hosting provider. Normally stuff like a MySQL database is charged for seperately as a "feature". They will provide you will a web-based interface for managing it and give you instructions for connecting to it.

You will want, however, to have a MySQL db and a web server on your home PC/laptop for development purposes. Database size will only be relevant if your hosting company charges by the MB for it. The software can handle HUGE volumes of data.

Not a bad project for the evenings in the hotel room if you work away from home. Keep you off the sauce anyway and provide you with some fun new skills...

All the best with it. Not a PHP/MySQL bod meself - I use the (free) Microsoft stuff at home and the (paid for) Microsoft stuff at work.

Hosting will probably cost you between £50 and £100 a year for what you need I'd have thought...

LeeME3

Original Poster:

1,502 posts

227 months

Monday 20th August 2007
quotequote all
Cheers Don, I've ordered a copule of books and looking into getting myself on an introductory course, should be able to get to somewhere useful with that as a starting point I reckon. Those long winter evenings are just going to fly by......!!!!

Famous Graham

26,553 posts

226 months

Monday 20th August 2007
quotequote all
www.devshed.com has a few handy tutorials for beginners in MySQL/PHP based sites.

kiwisr

9,335 posts

208 months

Monday 20th August 2007
quotequote all
This is a very good book. no need to order separate ones.

http://www.amazon.co.uk/PHP-MySQL-Web-Development-...

Don

28,377 posts

285 months

Monday 20th August 2007
quotequote all
kiwisr said:
This is a very good book. no need to order separate ones.

http://www.amazon.co.uk/PHP-MySQL-Web-Development-...
Super recommendation. Tempted to read it myself - it appears it is the "other" server side development environment of choice! (if you don't go Microsofty)

LeeME3

Original Poster:

1,502 posts

227 months

Monday 20th August 2007
quotequote all
Don said:
kiwisr said:
This is a very good book. no need to order separate ones.

http://www.amazon.co.uk/PHP-MySQL-Web-Development-...
Super recommendation. Tempted to read it myself - it appears it is the "other" server side development environment of choice! (if you don't go Microsofty)
By happy co-incidence that's one of the 2 I've ordered, along with:

http://www.amazon.co.uk/Build-Database-Driven-Webs...