Your question does not state what language you are using to handle this CSV file. I will reply using C#, but I imagine that the strategy will work equally well for Java too.
You can try using the StreamReader
class to read the file line-by-line. That should take care of the read side of things.
Something like:
using (var reader = new StreamReader(...))
{
var line = string.Empty;
while ((line != reader.ReadLine()) != null)
{
Process(line);
}
}
NB: That's a code snippet in C#, and is more pseudo-code than actual code.
You should create a database using some kind of local DB technology, either SQLite or SQL Server LocalDB or even MySQL and load the data into a table or tables in that.
You can then write any other further processing based on the data held in the database rather than in a simple text file.