|
Have any body tested/played around with SQLite?
SQLite ni dibundle sekali dengan PHP 5. Tak payah server SQL lain. Ada PHP5 boleh pakai SQLite terus. Database on your file system.
Ingat nak build website guna benda nih. |
|
|
|
|
|
|
|
Ada download hari tu ngan PHP5 tapi tak guna tu sebab dah ada SQL. Ko cubalah and citer kat sini apa2 kelebihan/kelemahan SQLite tu. |
|
|
|
|
|
|
|
Aku pun tak pernah cuba.
Tapi dari website http://www.zend.com/php5/articles/php5-sqlite.php
Introduction
In recent months you have probably heard about the new database extension for PHP: SQLite. By most accounts SQLite seems to be the best thing since sliced bread, offering a fast SQL interface to a flat file database, and creating an elegant alternative to bulky database interfaces, without the functionality or speed loss one might expect. In this article we will explore this wondrous new extension, and hopefully validate some of the benefits it is rumored to have.
What is SQLite?
SQLite is an embedded database library that implements a large subset of the SQL 92 standard. Its claim to fame is the combination of both the database engine and the interface (to said engine) within a single library, as well as the ability to store all the data in a single file. I terms of functionality SQLite resides somewhere between MySQL and PostgreSQL. However, when it comes to performance, SQLite is often 2-3 times faster (or even more). This is thanks to a highly tuned internal architecture, and the elimination of server-to-client and client-to-server communication.
All this is combined into a package that is only slightly larger than the MySQL client library, an impressive feat considering you get an entire database system with it. Utilizing a highly efficient memory infrastructure, SQLite maintains its small size in a tiny memory footprint, far smaller then that of any other database system. This makes SQLite a very handy tool that can efficiently be applied to virtually any task requiring a database.
What's in it for me?
Besides speed and efficiency SQLite has a number of other advantages that make it an ideal solution for many tasks. Because SQLite's databases are simple files, there is no need for administrative staff to spend time creating a complex permission structure to protect user databases. This is automatically handled by file system permissions, which also means that (in space restricted environments) no special rules are needed to keep track of user disk space. The users benefit from the ability to create as many databases as they desire and have absolute control over those databases.
The fact that a database is just a single file makes SQLite very portable across servers. SQLite also eliminates the need for database daemon processes that could eat significant amount of memory and other resources, even when the database system is liberally used.
http://sqlite.org/speed.html
Executive Summary
A series of tests were run to measure the relative performance of SQLite 2.7.6, PostgreSQL 7.1.3, and MySQL 3.23.41. The following are general conclusions drawn from these experiments:
SQLite 2.7.6 is significantly faster (sometimes as much as 10 or 20 times faster) than the default PostgreSQL 7.1.3 installation on RedHat 7.2 for most common operations.
SQLite 2.7.6 is often faster (sometimes more than twice as fast) than MySQL 3.23.41 for most common operations.
SQLite does not execute CREATE INDEX or DROP TABLE as fast as the other databases. But this is not seen as a problem because those are infrequent operations.
SQLite works best if you group multiple operations together into a single transaction.
The results presented here come with the following caveats:
These tests did not attempt to measure multi-user performance or optimization of complex queries involving multiple joins and subqueries.
These tests are on a relatively small (approximately 14 megabyte) database. They do not measure how well the database engines scale to larger problems. |
|
|
|
|
|
|
| |
|