Tablespace
Encyclopedia
A tablespace is a storage location where the actual data underlying database
objects can be kept. It provides a layer of abstraction between physical and logical data, and serves to allocate storage for all DBMS managed segments. (A database segment is a database object which occupies physical space such as table
data and indexes
.) Once created, a tablespace can be referred to by name when creating database segments.
Tablespaces specify only the database storage locations, not the logical database structure, or database schema
. For instance, different objects in the same schema may have different underlying tablespaces. Similarly, a tablespace may service segments for more than one schema.
By using tablespaces, an administrator can control the disk layout of an installation. A common use of tablespaces is to optimize performance. For example, a heavily used index can be placed on a fast SCSI
disk
. On the other hand, a database table which contains archived data that is rarely accessed could be stored on a less expensive but slower IDE disk.
While it is common for tablespaces to store their data in a filesystem file, a single file must be part of a single tablespace. Some database management system
s allow tablespaces to be configured directly over operating-system device entries, called raw device
s, providing better performance by avoiding the OS filesystem overheads.
Oracle
stores data logically in tablespaces and physically in datafiles associated with the corresponding tablespace.
Database
A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality , in a way that supports processes requiring this information...
objects can be kept. It provides a layer of abstraction between physical and logical data, and serves to allocate storage for all DBMS managed segments. (A database segment is a database object which occupies physical space such as table
Table (database)
In relational databases and flat file databases, a table is a set of data elements that is organized using a model of vertical columns and horizontal rows. A table has a specified number of columns, but can have any number of rows...
data and indexes
Index (database)
A database index is a data structure that improves the speed of data retrieval operations on a database table at the cost of slower writes and increased storage space...
.) Once created, a tablespace can be referred to by name when creating database segments.
Tablespaces specify only the database storage locations, not the logical database structure, or database schema
Logical schema
A Logical Schema is a data model of a specific problem domain expressed in terms of a particular data management technology. Without being specific to a particular database management product, it is in terms of either relational tables and columns, object-oriented classes, or XML tags...
. For instance, different objects in the same schema may have different underlying tablespaces. Similarly, a tablespace may service segments for more than one schema.
By using tablespaces, an administrator can control the disk layout of an installation. A common use of tablespaces is to optimize performance. For example, a heavily used index can be placed on a fast SCSI
SCSI
Small Computer System Interface is a set of standards for physically connecting and transferring data between computers and peripheral devices. The SCSI standards define commands, protocols, and electrical and optical interfaces. SCSI is most commonly used for hard disks and tape drives, but it...
disk
Hard disk
A hard disk drive is a non-volatile, random access digital magnetic data storage device. It features rotating rigid platters on a motor-driven spindle within a protective enclosure. Data is magnetically read from and written to the platter by read/write heads that float on a film of air above the...
. On the other hand, a database table which contains archived data that is rarely accessed could be stored on a less expensive but slower IDE disk.
While it is common for tablespaces to store their data in a filesystem file, a single file must be part of a single tablespace. Some database management system
Database management system
A database management system is a software package with computer programs that control the creation, maintenance, and use of a database. It allows organizations to conveniently develop databases for various applications by database administrators and other specialists. A database is an integrated...
s allow tablespaces to be configured directly over operating-system device entries, called raw device
Raw device
In computing, specifically Unix-like operating systems, a raw device is a special kind of block device file that allows accessing a storage device such as a hard drive directly, bypassing the operating system's caches and buffers...
s, providing better performance by avoiding the OS filesystem overheads.
Oracle
Oracle Database
The Oracle Database is an object-relational database management system produced and marketed by Oracle Corporation....
stores data logically in tablespaces and physically in datafiles associated with the corresponding tablespace.