Android: CSV database and SQLite database

How does the CSV database compare to the SQLite database on Android?

If you look at other questions in StackOverflow and read the documentation for Android developers, I saw that SQLite databases are used much more often than reading data from a CSV file. There are also questions that users wanted to import a CSV file into a SQLite database (for example, this question or this one ). Is there any advantage to using SQLite over CSV?

I tried to use both CSV and SQLite a bit, and in terms of performance I don't see a huge difference, but correct me if I am wrong here. Since I know that there are different methods for reading a CSV file, I opened it and read it using BufferedReader, for example:

BufferedReader reader = 
        new BufferedReader(new InputStreamReader(context.getAssets().open(fileName)));

And the SQLite database was opened in the usual way:

SQLiteDatabase db = helper.getReadableDatabase();

I'm not too sure about the differences in functionality, although I assume that SQLite is easier to manage and filter, and so I ask this question.

So, we summarize:

  • Are any of the two faster in terms of performance?
  • Does SQLite (or CSV) have any additional features that others don't have, especially on Android (since I know that Android has its own SQLiteDatabaseclass ?
  • , SQLite , CSV (.. CSV )?

EDIT:

, , , CSV - , .. , SQL. CSV , , , , , , . , .

+4
1

SQLite CSV , . SQLite - () SQL, , , ( , ) .

SQLite (, , ), - .

CSV, , , . , . , , , CSV.

( , ..), . , - .

+2

Source: https://habr.com/ru/post/1607183/


All Articles