Saturday, June 3, 2023

Differences between Datafile and Tablespace



 

Datafile

Tablespace

Definition

Physical file used by the DBMS to store data

Logical storage container within a database

Purpose

Stores actual data, indexes, and other database objects

Provides a logical organization and management structure for storing and accessing data

Location

Resides on a storage device (e.g., hard drive, SAN)

Exists within the database

Managed by

Operating system

Database management system

Unit of storage

Individual file

Collection of one or more datafiles

Allocation

Datafiles are allocated to tablespaces

Tables, indexes, and other database objects are allocated space within tablespaces

Administrative control

File-level management

Logical-level management

Separation

Represents physical storage

Provides a logical grouping of data

Usage

Accessed by the DBMS for reading and writing data

Used by the DBMS to organize and manage data


 




0 comments:

Post a Comment