Coding a dynamic database

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
KMGriffiths
Posts: 7
Joined: Thu Aug 06, 2009 7:32 am

Coding a dynamic database

Post by KMGriffiths » Sun Aug 09, 2009 7:58 am

I can find various commands/functions for creating tables in a database but can anyone give me the basic code to create a sql database named surveyor with 4 tables called doors, windows, height, width.

Any help would be appreciated.

Michael
Michael Griffiths

Klaus
Posts: 13878
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Post by Klaus » Sun Aug 09, 2009 2:03 pm

Hi Michael,

this is pretty straightforward SQL:
...
CREATE DATABASE surveyor
...

Check the query result and if OK then you can create your 4 tables with the necessary fields, maybe in a repeat loop :)


Best

Klaus

mfstuart
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 16
Joined: Sun Apr 09, 2006 9:49 pm
Location: Irvine, CA, USA

re: Coding a dynamic database

Post by mfstuart » Thu Aug 20, 2009 9:10 pm

Hi Michael,
If you need a tool to manage a SQLITE database, and if you have FireFox, check FireFox's Add in manager and search for SQLite Manager, it's free.
This is what I've been using recently.

After using the manager interface, it displays the CREATE DATABASE, CREATE TABLE, and CREATE INDEX sql scripts. You can then copy each of the scripts into RunRev to then manage your applications database and tables.
I put these scripts into constants and reference them in my scripts. Works great.

HTHU,
Mark Stuart

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Post by mwieder » Fri Aug 21, 2009 1:51 am

Ditto here. SQLite Manager is one of my favorite Firefox plugins.

Post Reply

Return to “Databases”