-
Notifications
You must be signed in to change notification settings - Fork 948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Major DataBase overhaul and restructuring [$20] #215
Comments
The tables are probably more clear when put in the perspective of the functional overview. Brief Table Explanation
The DetectionFlags table is explained like this:
|
Reserved again |
Thank you for opening this important Issue, @E3V3A. Let us know once you finished the diagrams. |
A major db change like this is a lot of work, with basically no gain to the end user (at least in the short term). Hope we find a developer willing to undertake this task. |
@tobykurien |
i agree with toby on some points. Lot's of work and no new detection mechanism. On the other hand we need to change the db (earlier or later) - maybe we can implement it step by step, when we really need to use a new table for a new method or detection. I still don't understand the db in detail - the tables on the right are for saving the positive detection events? Is there text somewhere to explain the new tables and the values a little bit? |
@He3556 Yes, I'm working on it, yes that's right about the DetectionFlags table. I added the details above. Actually, the items in that table are all pre-populated while the actual detections should be kept in an array in the app, with a reference to the _id_ of the detection in that table. So in that respect the table is not actually needed, apart from providing the descriptions and settings for each Detection. |
@E3V3A, please make sure that our Technical Overview stays up to date to avoid questions like this. |
My personal preference is to evolve an app as I go along, i.e. add a few detection mechanisms first (even if messy), learn what the patterns are, then refactor accordingly. While I agree that we probably need these new tables at some point, I am not convinced that we know enough right now to be able to efficiently design them and implement them. Since you're adding new tables, rather than modifying existing ones, it isn't as bad. You can indeed use SQL statements to populate the tables (or even put a pre-loaded database into the assets folder), that's how it's done by default - not via Java code. The thing is, you need Java code to wrap those tables for use in the code, so SQL statements aren't enough by themselves. Putting in a pre-populated db doesn't save much work. On top of that, you need to code in the CRUD operations on each field in each table, and then use the data appropriately. Think that for each field of each table you add, you are adding hours to possibly days of work, because each field must be initialized, loaded, saved, updated, upgraded, and used in the code appropriately. Each of those operations could spawn multiple bugs/issues. With the above in mind, I'd work on adding one field/table at a time, as and when we need them, rather than adding a whole bunch in one go. But this is just my methodology/philosophy, so feel free to ignore. |
Does that mean you are preferring to create a whole new App, or is this meant as "work on adding one field/table at a time, as and when we need them"? I also like your approach much more. Nothing against what @E3V3A said, but this is pretty much like completely re-inventing our whole App. |
No I definitely don't want to create a whole new app, but rather slowly evolve the existing one. |
@tobykurien, here ya go, now is our chance to rock this stuff since @E3V3A will be away for a week. so let's surpise him, shall we? please tell me what exactly I can tackle here and I'll do it right away! 😎 |
Updated the new ER-diagram with an |
Just found greenDAO by @greenrobot, which is essentially an open source project on GitHub to help Android developers working with data stored in SQLite. Thought I'd toss that in, maybe even helpful. |
@SecUpwN Thanks for trying to help, but this is already covered. We already have full access to any DB SW tools we need. (Do you remember adding those sponsor images?) |
Oh right. Thank you for reminding me. I'm outa here for now. |
I have an SQL script
Where shall I put it? I.e. in what GitHub directory? in assets? |
|
@SecUpwN Good thing to know, but I think we've got this one covered. We don't need dozens of pages of code to do this. Just the two lines above. We don't even need those lines, if we supply a pre-populated |
@E3V3A, I have just sent @banjaxbanjo a EUR 50 UKASH code since he really did an awesome job. Please take some quality time to add a testing procedure here so that we can work to finally close this. |
Because every time I ask someone to test something, there is no response. So I'm done with writing testing procedures that nobody give a fcuk about. Some people don't even bother to test their own PR's... |
@E3V3A, I can understand your frustration and will work on enforcing people to respond to your questions if not answered within a few days in the future. Please add a testing procedure for this now. |
I've just updated OP with a new ER design image. It is based on the latest aimsicd5.sql SQL script, that we should eventually use to create our original aimsicd.db file. However, the migration is not yet fully complete, as there were many small changes after code migration. These now need to be fixed. And developers are required to follow the ER diagram for fixing issues and implementing new functions. As I'm the maintainer of the DB create script, please contact me if you have any special design requirements. @SecUpwN can you please copy the image in OP and place it on the wiki where it belongs? |
Addendum:
See: PhoneStateListener developer info. We should also add the current roaming state to this column.. |
@E3V3A, done and made available in Technical Overview. |
Addendum:
|
Good morning members of @CellularPrivacy/database! This Issue is one of the most important Issues we need to solve ASAP. It has been open for nearly 2 years, was one of the hardcore reasons why E:V:A (our project inventor) left and still blocks all further serious IMSI-Catcher detection mechanisms. I would like everyone from the database team to closely read this whole Issue (yes, I know it's a pain, but necessary) so that we can move forward to finally close this bug for good. Keep in mind: Very URGENT! Quick sum-up of what you need to have a look at:
In the end, this is what our database needs to look like (documented in Technical Overview): |
I've started the branch feature/realm PR's to this branch are welcome |
Thanks, @larsgrefer. I hope this brings us forward. A few questions the others might have as well:
Our originial inventor E:V:A (who officially left our project and now mainly idles and monitors what we do) was mostly against anything else than SQL and did make very valid points about that. Since he was (is) our database guru, I feel like it is a good thing mentioning him here in the hope that you guys will have a friendly and respectful discussion here. @E3V3A, I would be happy to see your questions to @larsgrefer. |
It seems very interesting to me and I'd like to give it a try
Sure
We don't have to worry about OR-Mapping and get a nice java-api. |
20 USD bounty on this issue so far |
Manually updated this thread title as well and would like to reward it to @larsgrefer when merging #827. |
Not resolved. This issue was about expanding data categories that are collected by AIMSICD to get more information about cells, networks and devices! Not about using ORM as database middle-man! |
Many of the problems/whishes named in this issue are solved. Our persistence layer is on a clean state now. We have nicely named classes and fields. There are no unused classes or fields. The multi-threading problem is also fixed. |
I agree with you. The main move to a working and easily expandable database has been accomplished. @larsgrefer, even if not much, I'd like to say THANK YOU for investing heart blood with the $20 bounty. |
Moving to a working and easily expandable database is great. |
As we have noticed in many recent issues and many past discussions, there is a terrible urgent need to restructure our original database (DB). This DB was originally made for our very first attempts in building this app. However, we've come to realize that the way it is used and structured and how its tables are internally labelled is really confusing at best. It was made according to very weak documentation and poor understanding of what we actually needed.
After several weeks of thinking about this, on and off, I've come to the point where it's time to get it done. Here is a brand new proposal that should cover most features in the near future and hopefully most of the beta stage life-time.
This is the way we will do it:
NOTE: I suggest keeping the old tables while adding the new ones, to maintain simple and progressive migration.
There will surely be loads of questions surrounding this, but I think I might have covered most of it in the (still to be finished) documents:
Then there will be new App help pages and an FAQ, to be implemented inside app. (Separate issue.)
Here are the old currently used DB tables:
Here are the NEW DB tables:
UPDATED: 2015-07-31
Reference Issues: These are issues that directly depend on these tables.
#13, #69,#71, #91, #93, #97, #100, #117, #176, #201, (#203 ?),
More descriptions will be added below.
There is a $10 open bounty on this issue. Add to the bounty at Bountysource.
The text was updated successfully, but these errors were encountered: