Help Center/ GaussDB/ Developer Guide(Distributed_2.x)/ Overview/ Database Logical Architecture
Updated on 2024-10-14 GMT+08:00

Database Logical Architecture

DNs in a cluster store data on disks. This section describes the objects on each DN from the logical view, the relationship between these objects, and how data is distributed on different nodes. Figure 1 shows the database logical structure.

Figure 1 Database logical architecture
  • Tablespace: Directory storing physical files of its databases. Multiple tablespaces can coexist, and each of them can contain files belonging to different databases.
  • Database: A database manages various data objects and is isolated from each other. Objects managed by a database can be distributed to multiple tablespaces.
  • Datafile Segment: Data file, each of which stores data of only one table. A table containing more than 1 GB of data is stored in multiple data file segments.
  • Table: One table belongs to only one database and one tablespace. The datafile segments storing the data of the same table must be in the same tablespace.
  • Block: Basic unit of database management. Its default size is 8 KB.
  • Data can be distributed on DNs in REPLICATION, ROUNDROBIN, or HASH mode. It can be set while you create a table.