I want to use csv as a database in C language to execute some sql commands for filtration. Just like CSV-jdbc api is there in Java. Is there any way to do this???
Asked
Active
Viewed 210 times
0
-
Why do you want that? Why can't you parse your CSV then fill a database e.g. [sqlite](http://sqlite.org/) ? – Basile Starynkevitch Sep 23 '14 at 07:51
-
I dont want to use database at all. – Surinder Rajpal Sep 23 '14 at 07:52
-
Then why speak of SQL? SQL is for databases! – Basile Starynkevitch Sep 23 '14 at 07:53
-
Actually, i dont want to install external database. I want something like csv-jdbc api provided in Java. – Surinder Rajpal Sep 23 '14 at 07:54
-
But [SQLITE](http://sqlite.org/) is not an *external* database! – Basile Starynkevitch Sep 23 '14 at 07:55
-
And if you want exactly csv-jdbc (which I never heard about) just code your application in Java. – Basile Starynkevitch Sep 23 '14 at 07:56
-
Actually I want to make a utility in C and then use it in Java as dll. Is this possible if i use sqlite. – Surinder Rajpal Sep 23 '14 at 07:58
-
csv-jdbc is not much efficient. – Surinder Rajpal Sep 23 '14 at 07:58
1 Answers
2
SQLite would fit perfectly in your case ! You don't want an external database and you want to use it easily in C. So SQLite is the thing that you need !
Here is the doc : http://www.sqlite.org/c3ref/intro.html
And the list of functions : http://www.sqlite.org/c3ref/funclist.html

Nicolas Charvoz
- 1,509
- 15
- 41
-
-
Yes it is. See Sqlite's [limits](http://sqlite.org/limits.html). It is supposed to be able to handle a 100 terabyte database. – Basile Starynkevitch Sep 23 '14 at 08:02
-
1SQLite will handle [big] file just fine; make sure to import the records in a transaction so that it doesn't spend a lot of time creating indexes until everything is imported. from: http://stackoverflow.com/questions/1033309/sqlite-for-large-data-sets – Nicolas Charvoz Sep 23 '14 at 08:02
-
can u provide a little snapshot of code. That will be helpful. – Surinder Rajpal Sep 23 '14 at 10:09