1

I'm very new to Android and I have some problem in understanding DB concept in android.

When I create my table in android does android give my app static space? Or the DB size grows in a dynamic way, when I add more data to it?

If it does grows in dynamic way how much space it can grow to the max?

And the DB that is been created by my app is persistent? Android guarantees me that my data wont be removed by the Android OS?

Lucifer
  • 29,392
  • 25
  • 90
  • 143
batman
  • 4,728
  • 8
  • 39
  • 45

4 Answers4

2

Sqlite is a database management system, but a very light version of sql. Yes Database's size grows as you enter the data into it's table. The data ( text,int,float,image ) it self is made of binary information so it is going to take place.

If it does grows in dynamic way how much space it can grow to the max?

It depends on your available space.

And the DB that is been created by my app is persistent? Android guarantees me that my data wont be removed by the Android OS?

Yes, data style is persistence, it will stay into system as long as you dont remove it by programmatically or by manually.

Lucifer
  • 29,392
  • 25
  • 90
  • 143
0

In android your DB is saved as a file in the internal storage allocated for your application and it is persistent.

The path to your dB in common is

/data/data/<your-package-name>/databases

See implementation limits here

Arun C
  • 9,035
  • 2
  • 28
  • 42
0

There are main three question in single question

First

how much space it can grow to the max? see this

Second

DB that is been created by my app is persistent? see this

Last

Android guarantees me that my data wont be removed by the Android OS?

Once you have uninstall your app then you will not get back.May be other case if developer had store extra DB file in private path.

Community
  • 1
  • 1
Chintan Khetiya
  • 15,962
  • 9
  • 47
  • 85
0

When you create a database from an application, the database is saved at /data/data/APP-Name/Databases. As you keep adding tables the size increases, the maximum capacity of the database is 140 Terabytes and it is persistent.

CVA
  • 1,477
  • 1
  • 14
  • 23