Bureaucrats, cc_docs_admin, cc_staff
2,318
edits
No edit summary |
|||
Line 1: | Line 1: | ||
<languages /> | |||
<translate> | |||
[https://www.sqlite.org SQLite] is a "pocket database", in that it is a full-featured relational database which however dispenses with the client/server architecture of most such databases and instead exists entirely in a single diskfile. Software in a wide variety of common languages can read from and write to this database file using standard [https://en.wikipedia.org/wiki/SQL SQL] queries using the language's standard API for database interactions, assuming one exists and the database can be transferred to another computer simply by copying the file there. | [https://www.sqlite.org SQLite] is a "pocket database", in that it is a full-featured relational database which however dispenses with the client/server architecture of most such databases and instead exists entirely in a single diskfile. Software in a wide variety of common languages can read from and write to this database file using standard [https://en.wikipedia.org/wiki/SQL SQL] queries using the language's standard API for database interactions, assuming one exists and the database can be transferred to another computer simply by copying the file there. | ||
Line 14: | Line 15: | ||
This most common way of interacting with an SQLite (or other) database is programmatically, i.e. inside of a program written in one of various languages like [[R]], [[C++]] and [[Python]], using a series of function calls to open a connection to the database, execute queries that can read or update existing data in the database as well as inserting new data and finally close the connection to the SQLite database so that the changes (if any) are flushed to the SQLite file. In the simple example below, we suppose that the database has already been created with a table called <tt>employee</tt> that has two columns, the string <tt>name</tt> and <tt>age</tt>, an integer. | This most common way of interacting with an SQLite (or other) database is programmatically, i.e. inside of a program written in one of various languages like [[R]], [[C++]] and [[Python]], using a series of function calls to open a connection to the database, execute queries that can read or update existing data in the database as well as inserting new data and finally close the connection to the SQLite database so that the changes (if any) are flushed to the SQLite file. In the simple example below, we suppose that the database has already been created with a table called <tt>employee</tt> that has two columns, the string <tt>name</tt> and <tt>age</tt>, an integer. | ||
</translate> | |||
<tabs> | <tabs> | ||
<tab name="Python"> | <tab name="Python"> | ||
Line 78: | Line 79: | ||
</tab> | </tab> | ||
</tabs> | </tabs> | ||
<translate> | |||
==Caveats== | ==Caveats== | ||
SQLite is as the name suggests easy to use and intended for relatively simple databases and 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. | SQLite is as the name suggests easy to use and intended for relatively simple databases and 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> |