15.2 What Is Database File System (DBFS)?

Database File System (DBFS) creates a standard file system interface using a server and clients.

15.2.1 About DBFS

DBFS is similar to NFS in that it provides a shared network file system that looks like a local file system and has both a server component and a client component.

At the core of DBFS is the DBFS Content API, a PL/SQL interface in the Oracle Database. It connects to the DBFS Content SPI, a programmatic interface which allows for the support of different types of storage.

At the programming level, the client calls the DBFS Content API to perform a specific function, such as delete a file. The DBFS Content API deletefile function then calls the DBFS Content SPI to perform that function.

Figure 15-1 Database File System (DBFS)

Description of Figure 15-1 follows
Description of "Figure 15-1 Database File System (DBFS)"

15.2.2 DBFS Server

An implementation of a file system in the database is called a DBFS content store, for example, the DBFS SecureFiles Store. A DBFS content store allows each database user to create one or more file systems that can be mounted by clients. Each file system has its own dedicated tables that hold the file system content. In DBFS, the file server is the Oracle Database.

At the core of DBFS is the DBFS Content API, a PL/SQL interface in the Oracle Database. It connects to the DBFS Content Store Provider Interface, a programmatic interface which allows for the support of different types of storage.

Following are the different types of stores supported by the DBFS Content SPI:

  • DBFS SecureFiles Store: A DBFS content store that uses a table with a SecureFiles LOB column to store the file system data. It implements POSIX-like file system capabilities.

  • DBFS Hierarchical Store: A DBFS content store that allows files to be written to any tape storage units supported by Oracle Recovery Manager (RMAN) or to a cloud storage system.

  • User-defined Store: A content store defined by the user. This allows users to program their own filesystems inside Oracle Database without writing any OS code.

15.2.3 DBFS Client Access Methods

Learn about various methods to access DBFS in this section.

The Database File System offers several access methods.

  • PL/SQL Client Interface

    Database applications can access files in the DBFS store directly, through the DBFS Content API PL/SQL interface. The PL/SQL interface allows database transactions and read consistency to span relational and file data.

  • DBFS Client Command-Line Interface

    A client command-line interface named dbfs_client runs on each file system client computer. dbfs_client allows users to copy files in and out of the database from any host on the network. It implements simple file system commands such as list and copy in a manner that is similar to shell utilities ls and cp. The command interface creates a direct connection to the database without requiring an OS mount of DBFS.

  • File System Mount Interface

    On Linux and Solaris, the dbfs_client also includes a mount interface that uses the Filesystem in User Space (FUSE) kernel module to implement a file-system mount point with transparent access to the files stored in the database. This does not require any changes to the Linux or Solaris kernels. It receives standard file system calls from the FUSE kernel module and translates them into OCI calls to the PL/SQL procedures in the DBFS content store.

  • DBFS Links

    DBFS Links, Database File System Links, are references from SecureFiles LOB locators to files stored outside the database.

    DBFS Links can be used to migrate SecureFiles from existing tables to other storage.

See Also: