Skip to content
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

Improve AIMSICDDbAdapter.java #734

Open
33 tasks
SecUpwN opened this issue Dec 31, 2015 · 1 comment
Open
33 tasks

Improve AIMSICDDbAdapter.java #734

SecUpwN opened this issue Dec 31, 2015 · 1 comment

Comments

@SecUpwN
Copy link
Member

SecUpwN commented Dec 31, 2015

This is the TODO and Issues taken from AIMSICDDbAdapter.java which needs some heavy fixing. Not sure if you are abe to check these off one by one @larsgrefer or if we need a professional DB expert.


  • General
    • We'd like to Export the entire DB (like a dump), so we need ...
    • prepareOpenCellUploadData() this needs to be updated and re-coded
    • all functions related to SignalStrengthTracker.java need to be updated
    • addSignalStrength (int cellID, int signal, String timestamp)
      The timestamp is stored as String.valueOf(System.currentTimeMillis()); because the new db column for this is TEXT?
    • getAverageSignalStrength() // rx_signal
  • Various DB operations
  • We should make all detections outside of AIMSICDDbAdapter.java in a separate module as described in the diagram in Major DataBase overhaul and restructuring [$20] #215 where it is referred to as "Detection Module" (DET).
  • Seems as if we're querying too much, when we only need items: 1,3,4,8,11 (Try to avoid over query to improve performance.)
    • rewrite mDb.query to use mDb.rawQuery ??
      // Perhaps: "UPDATE DBi_measure VALUES isSubmitted=1 WHERE isSubmitted<>1;" ?
    • Add "act" in upload data for the DBi_measure:RAT
    • function getOCIDSubmitData() is not fully working ==> DB join not yet implemented
  • Database Population
  • Clarify: Why are we only populating 8 items out of 19?
  • Dumping aimsicd.db into aimsicd_dump.db
  • We probably also need to test if we have the sqlite3 binary. (See Busybox checking code.)
  • Apparently pipes doesn't work from Java... No idea why, as they appear to work
    • in the AtCommandFragment.java... for checking for /dev/ files.
  • Exporting database tables into CSV files
  • We should consider having a better file selector here, so that the user can select his own location for storing the backup files.
  • Don't use progress bar for each column item, but instead each table.
  • Cleanup and filtering of DB tables
  • Look into "long CID" and "Short CID" for UMTS/LTE...
  • Implement some kind of counter, to count how many cells was removed.
  • Better description of what was removed.
  • Give a return value for success/failure
  • Implement the "rej_cause" check and UPDATE table.
  • Implement proper usage of List of RAT versus Type from http://git.io/vEjfG
  • Implement Filtering done as it should be with http://git.io/vEjfD

Notes: By using rawQuery, we could count the number of items affected: mDb.rawQuery(sqlq, null); - But rawQuery() is not executed until there is an associated Cursor operation!

  • Signal Strengths Table
  • timestamp in DBi_measure is a String, but the one from SignalStrengthTracker is a long
  • Insert new detection strings into database
  • Need to change time data type to INTEGER in DB
  • * Section "Inserts a measurement into the DBi_measure and DBi_bts tables"*
  • Still not adding entry to DBi_bts
  • Where is this used and how?
  • MAYBE it's current use is still okay?
  • Using bts_id is WRONG! That is a foreign key id in the DBi_bts and used in DBi_measure
  • Inserting log data into the EventLog table
  • ALL events should be logged!!
  • To avoid repeated copies, only check last DB entries
  • Before inserting event, check that LAC/CID are not "-1".
  • Any related notifications are better put here as well, right?
  • **Section "Check if CID (currently bts_id) is already in DBi_measure"
  • replace bts_id with DBi_bts:CID
  • This is redundant because of cellInDbiBts

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@larsgrefer
Copy link
Collaborator

Don't forget about #655 ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants