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>
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With