PDA

View Full Version : O/l db and query interface



iain
08-28-2001, 09:23 AM
My acronym search engine currently uses a javascript, i know this is highly unpotomized and uses excessive server power. I want to port all the definitions to a proper database with a query interface. I dont have time at the moment to learn SQL - is there a free online database and a simple query system available anywhere on the net?

Theologian
08-28-2001, 09:49 AM
I would say that SQL is a simple way to query. Really- for what you want to do it will not be complicated at all.

You could do your whole thing w/one table and one query. For now lets call the table "AcDef". Put the fields you want in your query- like "Acronym_Name" and "Acronym_Definition".

Then when you want to query the database you just take the acronym that was typed in- put it in a variable (call it "acron" for here) and append it to the query

"Select *from AcDef where acronym_name = '" & acron & "'"

This is what it would like in ASP. But I think you'll get the drift. Simple queries like this are very easy to write and it takes little time to learn. SQL only gets more complicated when you start trying to do some tricky things and performance is involved.

If you are already familiar w/Java and your host supports java server pages- you could use jdbc to connect to a database very easily.

though I'm not sure how it works out if someone else is hosting your stuff- where you actually put the database, etc. I am used to working w/my own servers.

iain
08-28-2001, 10:41 AM
server control is not a problem, i have my own full account and can connect on root access if necessary. I will look up jdbc, do i create the dbase aqs normal in access?

Theologian
08-28-2001, 11:47 AM
>do i create the dbase aqs normal in access?

I'm not sure what you're asking here. Are you asking if you can build your database in access?

If so- yes you could.

If you are using microsoft products and have a way to use visual interdev you could use ASP. Visual interdev will build the connection string to the database for you.

Otherwise java or vbscript will work fine.

If you would like I will dig up some JDBC examples that I have at home. They are in java server pages that I built to work w/Access (I think- it might have been SQL Server, but probably Access)

iain
08-29-2001, 11:50 AM
my account does not support MySQL, does this make a difference?
I have only used a little jscript before and a little cgi - i am fairly new to 'proper' web programming.

Fordy
08-29-2001, 11:56 AM
If your happy going down the java road...

I'm trying to work with servlets at the moment, and I found a hosting service that gives you 5MB free space. With that space you should be able to build a servlet that uses JDBC to query your database (at least I think so anyway - I'm new to JDBC myself)

Try MyCGIServer (http://www.mycgiserver.com) if you want to give it a go