AirNav Systems Forum

AirNav RadarBox and RadarBox24.com => AirNav RadarBox and RadarBox24.com Discussion => Topic started by: steveb25 on March 12, 2008, 05:59:10 PM

Title: which Database do we do changes in
Post by: steveb25 on March 12, 2008, 05:59:10 PM
Hi All

I think I have now got my head around the two databases that store the info in ANRB.

My question is in relation to updates. I have got a copy of Sqlite expert to edit the files, but not sure as to which way to go.

Do both databases update each other. ie if I update the navdata.db3 will it make changes to myLog.db3 and vice-versa

Any help would be much appreciated.
Title: Re: which Database do we do changes in
Post by: steveb25 on March 12, 2008, 07:24:35 PM
Have just had a little play with the databases.
Findings so far.

It you added detail to the navdata.db3 it does not make any changes to the mylog.db3

Edit the cells in myLog.db3 and there is not update into navdata.db3

Or am I missing something

Steve
Title: Re: which Database do we do changes in
Post by: tarbat on March 12, 2008, 07:53:02 PM
There is no automated connection between any of the tables in either database.

That also means you should be careful to maintain referential integrity between tables whenever making changes.  Such as NOT adding a flight for an aircraft that doesn't exist, or adding a flight for a session that doesn't exist, etc.   Or even deleting an aircraft where flights exist for that aircraft.  Without knowing how Radarbox copes with such failures of referential integrity, it's a very dangerous business.

Airnav have not implemented any database triggers to deal with any referential integrity issues that may arise from end-users making updates outside of Radarbox.

By contrast, the Basestation database (SBS1) has triggers in the database to deal with deletions, such as:
CREATE TRIGGER AircraftIDdeltrig
  BEFORE DELETE
  ON Aircraft
BEGIN DELETE FROM Flights WHERE AircraftID = OLD.AircraftID;END;
Title: Re: which Database do we do changes in
Post by: steveb25 on March 13, 2008, 11:55:49 AM
Thanks for that tarbat

I had pretty much come to the same conclsuion myself, but just sought confirmation.

Maybe it is something airnav might look at in further updates to the software.

Once again many thanks for your time

Steve