Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Liquibase: What's the meaning of 'catalogName', 'remarks', and 'tablespace' attributes that applied to a table

Tags:

liquibase

I was trying to use Liquibase to create a table, but I don't know these three attributes: catalogName, remarks, and, tablespace. Though a table can be created without these attributes, I still wonder, what are the meanings of these attributes and when should I use them. (In my case, I use h2/mysql/postgres).

Below is the reference from Liquibase which listed the attributes but without detailed description.

REF: Liquibase | Database Refactoring | Change createTable

The code provided in the link:

<changeSet author="liquibase-docs" id="createTable-example">
    <createTable catalogName="cat"
            remarks="A String"
            schemaName="public"
            tableName="person"
            tablespace="A String">
        <column name="address" type="varchar(255)"/>
    </createTable>
</changeSet>
like image 288
wangsc Avatar asked Feb 01 '19 01:02

wangsc


1 Answers

CATALOG

Catalog is sometimes synonymous to "database" (at least in Oracle and Postgres), sometimes synonymous to "schema", and sometimes synonymous to both. The term catalog also often means metadata collection (system tables). The term of 'catalog' is thoroughly explained in this post: Relationship between catalog, schema, user, and database instance.

TABLESPACE (e.g for Oracle)

Databases, tablespaces, and datafiles are closely related, but they have important differences: 1. An Oracle database consists of one or more logical storage units called tablespaces, which collectively store all of the database's data. 2. Each tablespace in an Oracle database consists of one or more files called datafiles, which are physical structures that conform to the operating system in which Oracle is running. 3. A database's data is collectively stored in the datafiles that constitute each tablespace of the database. For example, the simplest Oracle database would have one tablespace and one datafile. Another database can have three tablespaces, each consisting of two datafiles (for a total of six datafiles).

Link for further research: [https://docs.oracle.com/cd/B19306_01/server.102/b14220/physical.htm]

REMARKS

Are comments associated with that table, like some kind of documentation.

like image 75
Andreea Tiron Avatar answered Oct 03 '22 19:10

Andreea Tiron