Comparison of file systems and databases

Source: Internet
Author: User

Comparison of file systems and databases

This paper mainly from the point of view of stand-alone system, compared with common file system and database technology. there should be a lot of missing places when you think about where you write.


Common:

    • belong to the system software or the underlying software
    • are used to store and access data.
    • Has a long history of research and development
    • have mature standards or specifications. This facilitates the development of portable programs and is not conducive to the development of innovative systems, especially distributed systems.
    • There is a lot of commonality in the implementation technology.
      • Mostly using a lower-level language such as C + +
      • Need to ensure consistency of data, special, varying levels of support services
      • There are concepts such as block or page or allocation unit or extent
      • Uses concepts and algorithms such as buffer cache, LRU, and Group commit
      • Have to do IO optimization for various loads

Different points:

    • Database support for transactions is much stronger, the file system can only guarantee the consistency of metadata
    • The database has different levels of consistency and is reflected in the form of isolation levels
    • The database can have redo and undo logs, and the file system generally uses only redo
    • The database transaction can be very long, the file system transaction is very short
    • The transaction of the database cannot be determined beforehand, it is user input, the transaction of the file system can be determined beforehand, the kind is clear
    • The database is implemented by the user state, and the file system is generally implemented by the kernel state. As a result, the former is easier to do across OS platforms
    • The access interface for a database is usually a non-procedural SQL language, and the file system is an API. The mainstream criteria for both are SQL and POSIX
    • The database can detect deadlocks, and the file system needs to avoid deadlocks.

Contact point:

    • Database systems often rely on file systems as their lowest-level storage, and may also implement some file system functions
    • File systems can be specifically optimized for this particular application of the database.
    • The file system can be used as a simple database (e.g. VSAM), and the database can also expose NFS (for example, Oracle)
    • The file system may use some simple database functions (such as using symbolic links as kv, implementing simple DB functions, or directly with a small DBMS)


Comparison of file systems and databases

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.