SQLite: Difference between revisions

no edit summary
No edit summary
No edit summary
 
Line 6: Line 6:


<!--T:2-->
<!--T:2-->
Like any other database, an SQLlite database should not be used on a shared filesystem such as home, scratch and project. Typically, you should copy your SQLite file to the local scratch <tt>$SLURM_TMPDIR</tt> space at the beginning of a job and you can then use the database without any issues and also enjoy the best possible performance. Note that SQLite is not intended for use with multiple threads or processes writing concurrently to the database; for this you should consider a [[Database_servers | client/server solution]].  
Like any other database, an SQLlite database should not be used on a shared filesystem such as home, scratch and project. Typically, you should copy your SQLite file to the local scratch <tt>$SLURM_TMPDIR</tt> space at the beginning of a job and you can then use the database without any issues and also enjoy the best possible performance. Note that SQLite is not intended for use with multiple threads or processes writing concurrently to the database; for this you should consider a [[Database_servers | client-server solution]].  


==Using SQLite directly== <!--T:3-->
==Using SQLite directly== <!--T:3-->
Line 13: Line 13:
You can access an SQLite database directly using the native client:
You can access an SQLite database directly using the native client:
{{Command|sqlite3 foo.sqlite}}
{{Command|sqlite3 foo.sqlite}}
If the file <tt>foo.sqlite</tt> does not already exist, SQLite will create it and the client will start in an empty database, otherwise you will be connected to the existing database. You may then execute whichever queries you wish on the database, such as <tt>SELECT * FROM tablename;</tt> to print to the screen the entire contents of the table tablename  
If the file <tt>foo.sqlite</tt> does not already exist, SQLite will create it and the client will start in an empty database, otherwise you will be connected to the existing database. You may then execute whichever queries you wish on the database, such as <tt>SELECT * FROM tablename;</tt> to print to the screen the entire contents of the table <tt>tablename</tt>.




Line 89: Line 89:


<!--T:8-->
<!--T:8-->
As its name suggests, SQLite is easy to use and intended for relatively simple databases which are neither excessively large (hundreds of gigabytes or more) nor too complicated in terms of their [https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model entity-relationship diagram]. As your SQLite database grows in size and complexity, the performance could start to degrade, in which case the time may have come to consider the use of more [[Database_servers | sophisticated database software which uses a client/server model]]. The SQLite web site includes an excellent page on [https://www.sqlite.org/whentouse.html Appropriate Uses For SQLite], including a checklist for choosing between SQLite and client-server databases.
As its name suggests, SQLite is easy to use and intended for relatively simple databases which are neither excessively large (hundreds of gigabytes or more) nor too complicated in terms of their [https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model entity-relationship diagram]. As your SQLite database grows in size and complexity, the performance could start to degrade, in which case the time may have come to consider the use of more [[Database_servers | sophisticated database software which uses a client-server model]]. The SQLite web site includes an excellent page on [https://www.sqlite.org/whentouse.html Appropriate Uses For SQLite], including a checklist for choosing between SQLite and client-server databases.


</translate>
</translate>
rsnt_translations
56,563

edits