File system and database comparison, file system database

Source: Internet
Author: User

File system and database comparison, file system database
Comparison between file systems and databases

This article compares common file systems and database technologies from the perspective of Single-host systems. There should be many omissions.


Commonalities:

  • Same as system software or underlying software
  • Are used to store and access data.
  • Has a long history of research and development.
  • There are mature standards or specifications. This is conducive to the development of portable programs, but also to the development of innovative systems, especially distributed systems.
  • There are also many commonalities in implementation technology.
    • Mostly use lower-layer languages such as C/C ++
    • Ensure data consistency. In particular, transactions are supported to varying degrees.
    • Both have the concept of Block, Page, Allocation unit, or Extent.
    • Buffer cache, LRU, Group commit, and other concepts and algorithms are used.
    • IO Optimization for Various Loads

Differences:

  • The database has much stronger support for transactions, and the file system can only ensure the consistency of metadata.
  • Databases have different levels of consistency, which are reflected in isolation levels.
  • The database can have REDO and UNDO logs. Generally, the file system only uses REDO logs.
  • Database transactions can be very long, and file system transactions are very short.
  • Transactions in the database cannot be determined in advance, but are input by the user. Transactions in the file system can be determined in advance with clear categories.
  • Databases are implemented in user mode, while file systems are generally implemented in kernel mode. Therefore, the former is easier to achieve cross-OS Platform
  • Database access interfaces are usually non-procedural SQL languages, while file systems are APIs. The mainstream standards for the two are SQL and POSIX.
  • The database can detect deadlocks, and the file system needs to avoid deadlocks.

Contact points:

  • Database systems often rely on file systems as their underlying storage, and may also implement some file system functions.
  • The file system can be specially optimized for special applications such as databases.
  • The file system can be used as a simple database (such as VSAM), and the database can also expose NFS (such as Oracle)
  • The file system may use some simple database functions (for example, using a symbolic link as KV to implement simple DB functions, or directly using a small DBMS)


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.