★ wanayoo — archive 1999 http://www.devshed.com/Talk/Forums/Forum16/HTML/000046.htmlNouvelle recherche | Portail wanayoo
DevShed Menu
* DevShed Home
* Developer News
* DevShed Brain Dump




UBBFriend: Email This Page to Someone!
  DevShed Discussion Forums
  Beginners
  Database access options?

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Database access options?
whatsgoingon
Junior Member
posted June 09, 2000 06:57 AM     Click Here to See the Profile for whatsgoingon   Click Here to Email whatsgoingon     Edit/Delete Message Reply w/Quote
Hi, I'm new to web programming, but trying to learn the best options for doing database access from html to a msql database on an apache server running linux. I have a programming backround, just new to the web.

My questions are:
1. Can I access the database from a client side script (javascript or cgi?)
2. What are my options for using a server side script. From what I can determine they are:

W3-msql (lite programming -included in msql)
Embedded perl
Jserv (Java Servlets)
PHP
Python

I don't know any of these tools, but am ready to learn. Any ideas on what is the easist and what is the best (these are not necessarily the same)? Any advice is appreciated. Thanks.

Adrian2
Member
posted June 17, 2000 06:09 PM     Click Here to See the Profile for Adrian2   Click Here to Email Adrian2     Edit/Delete Message Reply w/Quote
Cool! You are at the start of a great adventure!

First, forget client-side. It's not designed for this sort of stuff.

CGI is *server* side. It's a convention for passing parameters to a server-side script, not a language in itself. For example, Perl uses CGI and Perl programs (and others) are sometimes called "CGI scripts" leading to some confusion.

To declare my own interest, I write Perl that accesses MySQL. This is quite standard, though a lot of people use PHP and it is generally considered "easier to learn". "Best" and "easiest" are highly subjective terms. From a functional point of view, what you're planning to do is probably quite straightforward. Take form input, put it in a database. Take form input, query the database and display the results. It's not rocket science and an awful lot easier IMHO than say event-driven GUI stuff.

Also you refer to msql but MySQL is more commonly used, free(ish) and more powerful so it's a better one to go for. Though from a programming point of view they're extremely similar.

As you're already a programmer I'd say learn Perl and go that route. If you can do C, for instance, then Perl is a doddle. And of course there are lots of useful things you can do with Perl away from the web too.

For a cheap and easy intro to Perl/CGI, get Perl and CGI for the WWW by Elizabeth Castro. This doesn't cover databases but will get you started writing Perl scripts without bogging you down in heavy theory or irrelevant and silly topics.

Check out www.perl.com

Also "Programming the Perl DBI" by Descartes/Bunce is *the* book on Perl database access. MySQL & msql by Yarger/Reese/King is also useful but not essential.

I'm not claiming some ultimate truth here. There are many ways of approaching this. But this is the route that worked for me coming from the same place as you.

Given time, learn them all! (Why not?)

firepages
Member
posted June 17, 2000 09:39 PM     Click Here to See the Profile for firepages   Click Here to Email firepages     Edit/Delete Message Reply w/Quote

I have to agree with Adrian regarding client side - forget it however....

If however you expect to be doing a lot of database work - and/or form/mail work - please take a look at PHP first, as Adrian rightly says if you know C etc you will probably pick up PERL quick smartish - in fact you may already know it because it is not a web-based language.

This is its major downfall - PHP was written specifically for the web and data access, a trained chimp can pick up the gist of PHP, not to say it is not a very powerful language because it is - its just easy as well!

PHP has built in functions for all major (and minor) data sources, working with forms could not possibly be easier, mail functions are too easy to be considered true etc etc , just take a look in the PHP forums here on devshed - read through some of the Q&A and take a look at the manual online at http://www.php.net before you decide which way to go.
Simon.

------------------
Simon Wheeler
FirePages -DHTML/PHP/MySQL

All times are MST (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | DevShed.com

Copyright © 1997-2000 ngenuity. All rights reserved.

Powered by: Ultimate Bulletin Board, Version 5.41a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999.