官术网_书友最值得收藏!

PostgreSQL high-level object interaction

To sum up, a PostgreSQL server can contain many databases, programming languages, roles, and tablespaces. Each database has an owner and a default tablespace; a role can be granted permission to access or can own several databases. The settings can be used to control the behavior of the PostgreSQL server on several levels, such as database and session. Finally, a database can use several programming languages:

PostgreSQL high-level object interaction

PostgreSQL main components conceptual relations

In order to create a database, one needs to specify the owner and the encoding of the database; if the encoding of template1 does not match the required encoding, template0 should be used explicitly.

For the car web high level objects interaction portal database, let us assume that the database owner is the car_portal_role role, and encoding is UTF8. In order to create this database, one can execute the following commands:

CREATE ROLE car_portal_role LOGIN;
CREATE DATABASE car_portal ENCODING 'UTF-8' LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8' TEMPLATE template0 OWNER car_portal_app;;
主站蜘蛛池模板: 柞水县| 安泽县| 墨江| 泸州市| 青冈县| 江安县| 固始县| 博客| 永和县| 万年县| 昭平县| 乌拉特中旗| 沿河| 福清市| 昌都县| 乌鲁木齐县| 南宁市| 华蓥市| 镇坪县| 马边| 麻阳| 凤翔县| 同仁县| 栖霞市| 宿迁市| 镶黄旗| 景宁| 灵山县| 洞口县| 方正县| 达拉特旗| 乌鲁木齐县| 石棉县| 剑阁县| 文登市| 达尔| 沙坪坝区| 新蔡县| 五华县| 赣榆县| 镇宁|