QuoteOriginally posted by: outrunA common patterns when filling a relational database is to first insert data into a temporary table. The temporary table is a private table, every connections gets its personal version. This ensures that you are the only one acting on it, and that will allow you to manipulate it without worrying about concurrency. Once you have filled the temporary table you then move all the bulk data from the temp table into the real table(s) in a single transaction. During that move the main table might get partially locked. It will also allow you to update multiple tables in a single transaction, eg convert a flat redundant format into a relational format spanning multiple tables.In a special case one only needs to read the records into memory (forward read-only, single user). For example, with ADO.NET with a range of databases such as SQL Server, sqlite3, MySQL etc. BTW persistence in a library would be a useful addition to CSV files.
Last edited by Cuchulainn
on March 23rd, 2014, 11:00 pm, edited 1 time in total.