AirNav Systems Forum

AirNav RadarBox and RadarBox24.com => AirNav RadarBox and RadarBox24.com Discussion => Topic started by: abrad41 on December 08, 2008, 08:02:26 AM

Title: Duplicate Entries In Mylog
Post by: abrad41 on December 08, 2008, 08:02:26 AM
Hello and Good Morning

Could anyone shed any light on why I should be getting duplicate entries in mylog.
Just using a couple of examples I have

40080C  G-EMKK Flybe and 401229 G-FBEF also Flybe showing twice in mylog, How is the data sorted when first received - does it check the mode-s code to see if it is already in mylog etc or is it checked some other way to make sure you don't get duplicates.

I try to keep mylog upto date as much as I can, so to get this problem is very annoying, I update mylog manualy and never use the populate feature within mylog.

Cheers

Andy
Title: Re: Duplicate Entries In Mylog
Post by: abrad41 on December 08, 2008, 04:08:53 PM
Hi

I see AirNav support are about, so I am throwing this to the top, for there input on this matter and open to others.

Cheers

Andy
Title: Re: Duplicate Entries In Mylog
Post by: AirNav Support on December 08, 2008, 04:42:27 PM
They use the Mode-S id as the unique field for that table so not sure how its managed to get two of them in there.

As you say you are manually changing them I think you might have changed something.
Title: Re: Duplicate Entries In Mylog
Post by: abrad41 on December 08, 2008, 04:52:43 PM
Thanks AirNav

There is no way I could have changed anything - If it uses the mode-s id as the unique field both entries are showing the same mode-s 401229
The readings at Mode-s/Modescountry/Reg/Airline/aircrafttypelong/small/firsttime/lasttime are all the same on both entries.

If you like I could sent you a copy of mylog file - then you will see it for yourselfs

Andy
Title: Re: Duplicate Entries In Mylog
Post by: abrad41 on December 08, 2008, 06:44:10 PM
AirNav

Could this be somthing to do with the Bak files in the same folder, I use SQLite Maestro for updating mylog and when i have finished mylog must be different from the bak file.

Andy
Title: Re: Duplicate Entries In Mylog
Post by: tarbat on December 08, 2008, 07:24:05 PM
They use the Mode-S id as the unique field for that table so not sure how its managed to get two of them in there.
I don't think SQLite effectively enforces the uniqueness of the primary key.
Title: Re: Duplicate Entries In Mylog
Post by: abrad41 on December 08, 2008, 07:39:35 PM
Hi tarbat

tarbat, I am editing away from the Airnav software, its only showing me what is in the mylog file, unless some way that is making copy's.

I would like AirNav to have a external edit like sbs - it would be easyer to keep upto date.

What I am trying to do is just to keep mylog file up to date as much as I can, are you telling me the only way to do this, is to stop Rb from picking up the flights and manualy update through the my log window.

Andy
Title: Re: Duplicate Entries In Mylog
Post by: abrad41 on December 08, 2008, 08:04:54 PM
Hi

Right I have started with fresh data base - stopped network and hardware flights to update mylog- Question why do some flights show company name like
Flybe- British European then a couple of lines down on another flight show
Untitled(Flybe-British European)

This is a terrable way of trying to keep all records together - is this a bug - has it been noted before.

I shell run this new database for a week or so to see if I get any duplicates

Andy
Title: Re: Duplicate Entries In Mylog
Post by: RodBearden on December 08, 2008, 08:26:38 PM
Hi Andy

This Untitled business is a problem on the GAS database - it's duplicated in Airliners.net too, not just in RB.

I just edit the database from time to time to get rid of them. I wonder if AirNav could intercept and correct them for us?????

Rod
Title: Re: Duplicate Entries In Mylog
Post by: abrad41 on December 08, 2008, 08:36:28 PM
Thanks
Rod

I now have another problem, after running the first time as above - I updated everything, made sure to save by clicking on another line. Ran the RB again for about 10 mins or so - when I went back to update - everything I had updated the first time I had to do again, it had all be changed back to how it was,  Now this is not good

Andy
Title: Re: Duplicate Entries In Mylog
Post by: abrad41 on December 08, 2008, 08:53:05 PM
I have just run RB again, for about 3-4 mins.  This time it changed at least 2 records back to how they where at the start.

Can someone tell me what the point of having line's in a database like this

Flybe
Flybe-British European
Untitled(Flybe-British European)

Now if I want to look at all my Flybe records, where do I start, They are not all going to show together are they.

This is a very big issue and need to be sorted, I think who ever is entering the data into gas must be somtimes entering Flybe and then sometimes Flybe European.
Title: Re: Duplicate Entries In Mylog
Post by: DaveReid on December 08, 2008, 09:02:59 PM
I don't think SQLite effectively enforces the uniqueness of the primary key.

A primary key, by definition, must be unique.

I suspect the problem here is that SQLite, by default, doesn't treat indexed values as case-insensitive unless they are specifically defined that way.

So, for example, in SBS/BaseStation you can have two different records with ModeS values of, say 40094F and 40094f (where the latter has been populated manually or via a third-party application).

This scenario is known to cause problems in BaseStation, it might well be the same in RadarBox unless indexes have been explicitly defined as case-insensitive.
Title: Re: Duplicate Entries In Mylog
Post by: RodBearden on December 08, 2008, 09:11:33 PM
Now if I want to look at all my Flybe records, where do I start, They are not all going to show together are they.
 

Andy - it's not too big a problem - in Database Explorer, a search for FLYBE IN AC would show them all, and in MyLog, a filter for *FLYBE* would find them all.

I agree it's a pain - I'm sure that you would be welcome to volunteer to be a database administrator for GAS! In the meantime, as I said before, I do the correcting myself - doesn't take too long - I still get time to do the odd outline ;-)

Rod
Title: Re: Duplicate Entries In Mylog
Post by: tarbat on December 08, 2008, 09:24:45 PM
A primary key, by definition, must be unique.

You would have thought so!!  But SQlite doesn't enforce the field length ( http://www.sqlite.org/faq.html#q9 ), or case independence.  So, it's easy to get what appear to be duplicates, by either using upper/lower cases, or leading/trailing spaces.  See previous discussion at http://www.airnavsystems.com/forum/index.php?topic=612.msg4694#msg4694

SQLite Maestro does enforce the field length when editing, but Radarbox doesn't.  Although SQLite Maestro can't enforce the case independence of the primary field.
Title: Re: Duplicate Entries In Mylog
Post by: DaveReid on December 08, 2008, 10:04:12 PM
So, it's easy to get what appear to be duplicates, by either using upper/lower cases, or leading/trailing spaces.

My point exactly.  Key values that aren't readily distinguishable to the user may still be different in SQL terms and therefore still satisfy a uniqueness constraint.
Title: Re: Duplicate Entries In Mylog
Post by: abrad41 on December 09, 2008, 09:52:31 AM
Ok I have read the comments, But why are my entries being changed back to how they are at the start. Its no good updating a database if its going to be changed back when you start Rb again. A lot of my use is to keep upto date records of what my system has picked up, so this a big problem to me.

Can we have some input from Airnav, to see if this has been looked at or if anything can be done about it. 

I think I remember about a week or two ago someone else haveing a simular problem with my log.

Cheers

Andy
Title: Re: Duplicate Entries In Mylog
Post by: Allocator on December 09, 2008, 09:59:10 AM
Andy,

I wonder if you are actually manually editing the records - which database are you changing, MyLog.db3 or NavData.db3?

NavData.db3 is the main database and MyLog.db3 is only a historical record of what you have seen, based on the data in NavData.db3 when the aircraft was detected.

I have no duplicates in NavData.db3 as the Mode S Hex code is the primary record and duplicates aren't allowed.

The Autopopulate function will not overwrite records already present in NavData.db3 for the very reasons you state.
Title: Re: Duplicate Entries In Mylog
Post by: abrad41 on December 09, 2008, 10:33:31 AM
Thanks Allocator

Yes you could be right, I have been updating mylog, so you reckon I should be doing all my updating in Navdata.db3, then mylog will get all the right data to display in mylog.

Do mylog always look at Navdata.db3 when it receives a flight, if not it then goes to Rb Network database - is this right.

Can you work and update Navdata.db3 while Rb is running.

Thanks again mate

Andy
Title: Re: Duplicate Entries In Mylog
Post by: besty on December 09, 2008, 10:44:12 AM
I've just updated an AAC flight on my database explorer, so it has gone into my navdata.db3 but to get it onto the screen you have to stop processing hardware flights and restart them to show  the changes on the screen but you can work on it and still use the radarbox.
hope this helps
Stuart
Title: Re: Duplicate Entries In Mylog
Post by: abrad41 on December 09, 2008, 11:07:16 AM
Besty8

Thank you mate, I will try this when I get home

Andy