· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
SQ Lite

sqlite.gif
[GIF image (2.99 KB)]
ÃʱâÀÛ¼ºÀÚ - mcguiver9

SQLite ´Â ¾ö¹ÐÈ÷ ¸»Çؼ­ DBÀÌÁö¸¸ DBMS´Â ¾Æ´Ñ ÆÄÀÏDBÀÔ´Ï´Ù.




1. Ư¡

  • Transactions are atomic, consistent, isolated, and durable (ACID) even after system crashes and power failures
  • ¼³Ä¡½Ã setupÀ̳ª admin¼³Á¤ÀÌ ÇÊ¿ä¾øÀ½
  • ´ëºÎºÐÀÇ SQL92 ±¸Çö
  • µ¥ÀÌÅͺ£À̽º°¡ ÆÄÀÏ Çϳª·Î µÇ¾î ÀÖÀ½
  • 2Å׶ó¹ÙÀÌÆ®(2ÀÇ41½Â) Áö¿ø
  • BLOB°ú ¹®ÀÚ¿­ÀÇ »çÀÌÁî´Â ¿ÀÁ÷ ¸Þ¸ð¸®¿¡ ÀÇÇØ Á¦ÇÑ
  • ½ÇÇàÆÄÀÏÀÇ »çÀÌÁî ÀÛÀ½(250KB)
  • Client/Server µ¥ÀÌÅͺ£À̽º ¿£Áøº¸´Ù ºü¸¥ ¼Óµµ
  • API °¹¼ö°¡ ¾ÆÁÖ ÀûÀ½(ÇÁ·Î±×·¡¹ÖÇϱ⿡ °£´Ü)
  • ¿ÜºÎ Dependency°¡ ¾øÀ½
  • public domain ¶óÀ̼¾½º·Î ¾î¶² ¸ñÀûÀ¸·Îµµ »ç¿ë °¡´É
  • PHP5¿¡¼­ ±âº» Áö¿ø(MySQL ¸ðµâÀÌ ºüÁ®ÀÖÁö¸¸ ´Ù½Ã È­ÇØÇß´Ù´Â ¾ê±âµµ ÀÖÀ½)

2. 3.0¿¡ Ãß°¡µÈ ±â´É

  • Çâ»óµÈ CompactÇÑ µ¥ÀÌÅͺ£À̽º ÆÄÀÏ Çü½Ä
  • ¸í¹éÇÑ Å¸ÀÔ ¹× BLOBÇü½Ä Áö¿ø
  • UTF-8, UTF-16 Áö¿ø Ãß°¡
  • »ç¿ëÀÚ Á¤ÀÇ text collating sequences
  • 64 bit ROWIDs
  • Çâ»óµÈ Concurrency

3. ºü¸¥½ÃÀÛ

SQLite¶ó´Â DB´Â °£´ÜÈ÷ ¸»Çؼ­ SQLÀ» »ç¿ëÇÏ¿© ÁúÀÇÇÒ ¼ö ÀÖ´Â ÆÄÀÏDB ÀÌ´Ù. DB°¡ EmbededµÈ ApplicationÀ» ½±°Ô ÀÛ¼ºÇÒ ¼ö ÀÖÀ» °Í °°´Ù. õõÈ÷ ÀÌ ²¿¸¶±«¹° DB¿¡ ´ëÇؼ­ ¾Ë¾Æº¸·Á ÇÑ´Ù.

[http]Quickstart ¿ø¹®º¸±â

Áö°Ü¿î ¸Þ´º¾óºÎÅÍ º¸Áö¸»°í SQLite¸¦ ÀÏ´Ü Ã¼ÇèÇغ¸ÀÚ. ¿©±â¼­´Â ÀÏ´Ü Á¦°¡ ¼³Ä¡ÇØ º» À©µµ¿ì¹öÁ¯À» ¼³¸íÇÑ´Ù.

C:\sqlite> sqlite3 test.db

C++¿¡¼­ÀÇ ±¸Çö ¿¹Á¦(´Ü, 3°³ÀÇ ÇÔ¼ö Á¦°ø- ÃÊ°£´Ü)
#include <stdio.h>
#include <sqlite3.h>

static int callback(void *NotUsed, int argc, char **argv, char **azColName){
  int i;
  for(i=0; i<argc; i++){
    printf("%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL");
  }
  printf("\n");
  return 0;
}

int main(int argc, char **argv){
  sqlite3 *db;
  char *zErrMsg = 0;
  int rc;

  if( argc!=3 ){
    fprintf(stderr, "Usage: %s DATABASE SQL-STATEMENT\n", argv[0]);
    exit(1);
  }
  rc = sqlite3_open(argv[1], &db);
  if( rc ){
    fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
    sqlite3_close(db);
    exit(1);
  }
  rc = sqlite3_exec(db, argv[2], callback, 0, &zErrMsg);
  if( rc!=SQLITE_OK ){
    fprintf(stderr, "SQL error: %s\n", zErrMsg);
  }
  sqlite3_close(db);
  return 0;
}


4. »ç¿ë°¡´É ¹®¹ý


  • ALTER TABLE
  • ANALYZE
  • ATTACH DATABASE
  • BEGIN TRANSACTION
  • comment
  • COMMIT TRANSACTION
  • COPY
  • CREATE INDEX
  • CREATE TABLE
  • CREATE TRIGGER
  • CREATE VIEW
  • DELETE
  • DETACH DATABASE
  • DROP INDEX
  • DROP TABLE
  • DROP TRIGGER
  • DROP VIEW
  • END TRANSACTION
  • EXPLAIN
  • expression
  • INSERT
  • ON CONFLICT clause
  • PRAGMA
  • REINDEX
  • REPLACE
  • ROLLBACK TRANSACTION
  • SELECT
  • UPDATE
  • VACUUM

5. »ç¿ëºÒ°¡´É ¹®¹ý

¾ÆÁ÷ SQLite¿¡¼­´Â Áö¿øµÇÁö ¾Ê´Â ¹®¹ý

  • FOREIGN KEY constraints
  • Complete trigger support
  • Complete ALTER TABLE support
  • Nested transactions
  • RIGHT and FULL OUTER JOIN
  • Writing to VIEWs
  • GRANT and REVOKE


ID
Password
Join
You have an ambitious nature and may make a name for yourself.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2006-04-05 18:12:32
Processing time 0.0069 sec