Android Question Sqlite Database options

Discussion in 'Android Questions' started by ALBRECHT, Aug 10, 2019.

  1. ALBRECHT

    ALBRECHT Active Member Licensed User

    Hello,

    I like to get a suggest of method, regarding best practices for my App :

    1/ i have an SQLITE db that contain general setting strings and language strings for its operation, and independent of user data. I systematicaly copy that DB from asset dir to Internal, so even after app updating, that strings are always uptodate.

    2/ i have an other SQLLITE db that contain user settings tables and data tables completely dependent of the user. That DB is not killed or modify by app updating

    So, is 2 databases the good way to admin this two different kind of data ?

    Regards
    Michel
     
  2. AnandGupta

    AnandGupta Active Member Licensed User

    I do not see any problem here.
    Many apps use more than one sqlite db as per their requirements.

    Your connection string will determine which db is connected.

    Regards,

    Anand
     
  3. ALBRECHT

    ALBRECHT Active Member Licensed User

    Ok,

    i was to be sure to correctly differentiate the data specific to the user (id, name, and all he makes with the app) from those of the app itself (like languages, settings ...).

    and I told myself that it was possible to work with a single db, but so how ?

    or the traitement in 2 separate db is the best way (especially to manage updates ...)
     
  4. AnandGupta

    AnandGupta Active Member Licensed User

    Two separate db are best way, as you are free with different tables and field names and manipulation of structure, as and when needed, IMHO.

    Regards,

    Anand
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice