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

  • Learning PostgreSQL
  • Salahaldin Juba Achim Vannahme Andrey Volkov
  • 163字
  • 2021-04-02 20:32:15

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;;
主站蜘蛛池模板: 贵定县| 泾阳县| 营口市| 静乐县| 宁乡县| 安塞县| 苏尼特右旗| 启东市| 乌审旗| 西盟| 宜宾县| 临朐县| 安远县| 班玛县| 桑植县| 凤台县| 镇宁| 石门县| 岳普湖县| 揭阳市| 富阳市| 阳曲县| 丽江市| 兴国县| 新巴尔虎右旗| 延长县| 黄龙县| 轮台县| 乌拉特后旗| 崇左市| 桃园县| 霸州市| 漳浦县| 沅陵县| 成都市| 通江县| 朝阳区| 高淳县| 安庆市| 江陵县| 樟树市|