Advanced Database usage questions
Posted: Wed Oct 19, 2011 7:38 pm
Hi, I'll start with the fact that I'm fairly new to Livecode. I am currently writing a small application with three tables in it. I have a view created that combines the data into one place for the purpose of display. THX to those who helped me out with that excercise! I'm now faced with getting Livecode and SQLite to update the various tables. I understand that I cannot update all the tables at once due to a limitation in SQLite. So I've turned to creating a view with triggers, and subsequent updates to each table in sequential form.
Table 1 Table 2 Table 3
------------------------ ---------------------- ----------------------
ID1 ID2 ID3
Date created Table2ID Table3ID
Date Modified Table2Date created Table3Date created
Table2Date Modified Table3Date Modified
Data2 Data3
The problem I have is understanding how to get the Table 1 ID1 into the the remaining tables to create the referential key needed to link the records togather. Do I need seperate statements to be executed, ie do I need to create the view seperately from the update statements?
I guess my question is does anyone have an example kicking around or advice on preparing the SQL and subsequent rev commands for execution
Table 1 Table 2 Table 3
------------------------ ---------------------- ----------------------
ID1 ID2 ID3
Date created Table2ID Table3ID
Date Modified Table2Date created Table3Date created
Table2Date Modified Table3Date Modified
Data2 Data3
The problem I have is understanding how to get the Table 1 ID1 into the the remaining tables to create the referential key needed to link the records togather. Do I need seperate statements to be executed, ie do I need to create the view seperately from the update statements?
I guess my question is does anyone have an example kicking around or advice on preparing the SQL and subsequent rev commands for execution