When is a database an SQL DB?

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Arcadian
Posts: 2
Joined: Mon Jun 05, 2006 12:06 pm
Location: Oxford UK

When is a database an SQL DB?

Post by Arcadian » Wed Jun 14, 2006 2:57 pm

Hi, I am new to Revolution Studio and new to programming and I have a basic (i think) question so please be patient! :roll:

I'm attempting to create an application for my own use which is a customizable combination of an information manager-type app and Apple's Automator-style programme..

I am studying international law/international relations and I would find it immensely useful to have an application which pulls information from various online sites/databases i subscribe to (e.g the CIA Factbook containing country economic data, UN treaty information, economic data, whatever) and combines that info in a customizable way, with the ability to search across the various resources and represent the information graphically or textually, add notes, hyperlinks and so on. I could then create/save individual 'workbooks' containing particular info combinations , and save them as PDFs (like Altuit's Hemingway has the ability to save a website as a PDF), export or email them etc. (I've been assured that this should not be too difficult to achieve with Revolution though the realisation of it seems daunting to a newbie like me).

The main application process would be something like:
1. choose location A (URL site or file), choose location B, choose location C
2. select & download data, A,B,C
3. search across locations A,B,C
4. show result

So my question (apart from "Where on earth do I start??") is:

- When is an online information resource an SQL database? For example is the info on the CIA Factbook website [ http://www.cia.gov/cia/publications/factbook/ ] an SQL db or do I need to set up such a DB to manipulate the data on this or similar sites?

I hope I've explained myself clearly! any pointers would be greatly appreciated

TIA

Frank

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Post by BvG » Wed Jun 14, 2006 6:08 pm

When is an online information resource an SQL database? For example is the info on the CIA Factbook website an SQL db or do I need to set up such a DB to manipulate the data on this or similar sites?
If a database is based on SQL can only be guessed, when looking at the HTML pages of a site. An SQL database is most often something in the background, a way to store your files, not a way to present them. People use many different frontends for their SQL backends.

You want to automatically querry the factbook HTML sites (the frontend), which would be a rather hard undertaking, as HTML doesn't lend itself easily towards automatic parsing.
Even if there was a database of any kind behind those sites, it wouldn't bring you any good, as long as you don't have access to it.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

Arcadian
Posts: 2
Joined: Mon Jun 05, 2006 12:06 pm
Location: Oxford UK

Post by Arcadian » Thu Jun 15, 2006 12:55 pm

BvG

thanks for the reply and for clarifying that. I suppose I'll have to take a different approach.

It occurs to me that the nearest example of the kind of app I wish to achieve is a price comparison site like Kelkoo or Pricerunner, where they take constantly updated info from various sources and compare them. In my case, the data would be mostly less mutable than that, but it would be useful where I wanted to create a 'workbook' within the application for comparing stock-market fluctuations between companies say.

The second 'layer' of the application would be the ability to add one's own comments, links etc to the basic comparisons.

I'm aware that my aim may be higher than my ability to acheive it, but if i knew that it was possible, -and within Revolution's capabilities - then I could at least make a stab at it.

bearing in mind the Kelkoo model, would this be something that could be done?

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Post by BvG » Thu Jun 15, 2006 10:17 pm

I guess you'd want to querry the website, and get the right data out of it (like in your example).

So you' do something like this:

Code: Select all

put url "http://www.cia.gov/cia/publications/factbook/geos/aa.html" into mySite
put offset("<a name=" & quote & "Intro" & quote & ">Introduction</a>",mySite) into startChar
put offset("<a name=" & quote & "Geo" & quote & ">Geography</a>",mySite) into endChar
set the htmltext of field 1 to char startChar to endChar of mySite
note that this will kinda get rid of tables, and other formatting options are ommited too, so maybe you want to look at altbrowser, or just do the next line instead of the last line above:

Code: Select all

put char startChar to endChar of mySite into field 1
either way you'd need to prepare the raw html a bit to suit your needs.

IF you are only interested into the rank order files, these are avaiable as tab dellimited files, so it would be easy to parse those.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

Lynn
Posts: 109
Joined: Thu Feb 23, 2006 7:43 pm

Re: When is a database an SQL DB?

Post by Lynn » Thu Jun 22, 2006 11:26 pm

Arcadian wrote:...
- When is an online information resource an SQL database?
SQL is a query language for databases, and there have been several "revs" of the standard - these will often be expressed in the year of adoption of the standard, such as SQL '92. Dont think though that just because its SQL '92 that its covered with cobwebs ;-) That just means its compatible with the spec from that year.

Most databases also extend SQL to take advantage of special features. For example, Valentina SQL is SQL '92 compatible, with some SQL 2003 features plus support for the various object-relational features of Valentina - stuff that only Valentina has vs Oracle, mySQL, etc.

If you are brand spanking new to databases, give Databases Demystified a try. It's a good introduction to dbs, though it does tend to use Access as an example (for good or for ill). I see also that since I read that book, the same author has also come out with SQL Demystified, which may be a better match.
Best regards,


Lynn Fredricks
Paradigma Software - Ultra Fast Database & Reporting Platform for LiveCode
http://www.paradigmasoft.com

Post Reply

Return to “Databases”