Embedded database management system - the architecture of database management systems when the DBMS is closely connected with the application program and runs on the same computer without requiring professional administration .
Embedded DBMSs are used in many programs that store large amounts of data, but access from many computers is not required. On the "desktop" of an inexperienced user there are also programs that can contain an embedded DBMS: email clients and messengers (correspondence databases) [1] , media players ( playlists and covers) [2] , image viewers ( metadata and thumbnails) [3] , various local databases, such as telephone directories and geographic information systems (provided data).
Historically, local and file-server DBMSs provided a scripting language in which the user could write an application program. This is how Microsoft Access , FoxPro , Clipper , 1C: Accounting are arranged. The disadvantage of this approach was the extreme poverty of the resulting programs, limited debugging tools. And often there was no compact runtime that could be distributed with the program; need a program - install the whole package. With the spread of dynamic linking and the opensource community, the pendulum swung the other way: let the programmer write his program in a high-level language that is convenient. The DBMS will be connected to the program and become one with it.
Features
- There is no separate server program
- A physically embedded DBMS is a library that is statically or dynamically connected to the main program. The program and the DBMS communicate not through network sockets , but through a specialized API [4] [5] . In this, however, there is a drawback: often the programmer himself must not allow multithreaded races .
- High speed and low memory consumption, especially on long lines and blobs
- Thanks to a specialized API, the number of read / write operations is minimal.
- Often the maximum database size is small by the standards of the database
- From gigabyte units (PC memory capacity for 2012) to terabyte units (about the volume of a hard disk). For example, SQLite always keeps in memory the table of contents of the database (an analogue of the file allocation table ), this limits the volume of the database [6] .
- Typically, specialized query language or incomplete compatibility with SQL-92
- For the sake of productivity, developers often implement either partial SQL ( SQLite ), [7] or a specialized query language ( BerkeleyDB ). In addition, embedded DBMSs can act on a completely different principle than client-server ones: ping to the database is zero, and the request can be performed in parts, by a few calls to the DBMS.
- As a rule, there are no user rights [7] ; simple transaction isolation
- A larger single-user database is not needed. As a rule, transactions are isolated on the basis of the “ write one at a time ” principle using standard OS mechanisms such as file locking . Access to one file from several programs can be adjusted: for example, SQLite successfully works in lightly loaded sites [6] . But the high load is too tough for him.
- As a rule, there is no database archiving and replication
- An embedded database is only as reliable as the DBMS library and the file system on which the database is located. Well-known embedded DBMSs are, as a rule, well tested , [8] and modern file systems are very reliable. However, there are many ways to lose data, [9] so such solutions are inferior in reliability to server-side DBMSs.
- As a rule, there are no language tools that simplify access to the database.
- Specialized DBMS languages like xBase are usually a symbiosis of a query language and an application programming language. In general-purpose programming languages, the correctness of the request will not be verified during compilation, but only when the request is sent to the DBMS. And, of course, in a general-purpose programming language, database access constructions (both embedded and client-server) will be heavy.
- However, in C # there is a LINQ query language that compiles into a combination of method calls, and those, as a rule, prepare regular SQL .
Examples
- Accuracer Database System
- Advantage database server
- Oracle Berkeley DB
- CSQL
- EffiProz
- Elevatedb
- Empress embedded database
- Extensible storage engine
- eXtremeDB
- Embedded version of Firebird
- HSQLDB
- Infinitydb
- Embedded version of Informix Dynamic Server
- Embedded version of InnoDB
- Embedded InterBase
- ITTIA DB
- Kyoto Cabinet
- Embedded MySQL
- NexusDB
- Rdm embedded
- Scimoredb
- SolidDB
- Sqlite
- Microsoft SQL Server Compact
- Turbodb
- Valentina db
- VistaDB
Notes
- ↑ In particular, Skype uses SQLite to store correspondence databases
- ↑ In particular, AIMP uses SQLite to store playlists.
- ↑ In particular, XnView stores thumbnails and tags in the SQLite database.
- ↑ BerkeleyDB API Example
- ↑ SQLite API Example
- ↑ 1 2 Using SQLite
- ↑ 1 2 What is not in SQLite
- ↑ How SQLite is Testing
- ↑ How can I spoil a SQLite table