Whole Storage and Random Access of Folder in Database

LV Zhi-ping · Jisuanji gongcheng · 2011

Existing database system can not support to store a whole folder into a database and provide random access to any file in it.Aiming at this problem,this paper puts forward a method to store a folder as a whole and access its file randomly in a database based on the integration of Binary Large Object(BLOB),stream and serialization technology.The folder is packed up,resulting in a file stream and a directory structure object.The directory structure object is serialized to a directory structure stream.The file stream and directory structure stream are saved as BLOB data in a database respectively.When reading from the database,it first reads the directory structure BLOB data as a stream,and deserializes it to the directory structure object.With the information in the directory structure object,it can choose which file to access and ascertain its location and size in the folder's file BLOB data.It reads the corresponding data section out of the database and realize the random access of a file.

Read the paper · More papers on PaperTik