Storage of large objects

Source: Internet
Author: User

This problem has been bothering me for the past two days.

(1) large objects exist in the Database

(2) large objects are stored in the file system and connected to the database.

In the first case, the advantage is obvious: data consistency and maintainability are good, but the disadvantage is that the efficiency is relatively high. If there are more than a dozen concurrent records, the efficiency of the database is relatively low. Of course, the advantages and disadvantages of the first type are the opposite of those of the second type. The second type of problem is how to solve the synchronization problem, that is, the files in the file system are deleted, the database connection should be invalid. after reading some references on the internet, I think this is also a good practice. I 'd like to give you some comments.

Large objects are incorporated into the database and stored in the file system, and the database retains the connection of this large object in the file system.

In this case, when the user requests, go to the file system to find the object. If yes, download the object directly. If no, restore the large object in the database to the file system and download the object to the user.

In addition, the database is directly stored in the file system without backup. A file monitor directly updates the database when you perform any operations on files in the file system. the purpose is to maintain consistency.

Storage of large objects has always been a big problem. If you have good suggestions, please share them with us.

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.