Hello,
This information is basically obtained from the appropriate documentation of the database you are working with. For example, in HSQLSB v1.8 embedded ( LO current default) a unique constraint is:
ALTER TABLE <tablename> ADD [CONSTRAINT <constraintname>] UNIQUE (<column list>);
Please see the docs for v1.8 Chapter 9 for more information → Hsqldb User Guide
For MariaDB the documentation is here → MariaDB Documentation
Also, many relations can be set from the main Base screen menu under Tools->Relationships
. For this, see the LO documentation found here → LibreOffice Base Handbook in Chapter 3 - Tables.