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

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;;
主站蜘蛛池模板: 武宣县| 富裕县| 澄江县| 灯塔市| 汝南县| 涪陵区| 全州县| 邛崃市| 广州市| 治多县| 旌德县| 云和县| 五台县| 周至县| 获嘉县| 兰坪| 淳化县| 桐庐县| 扎囊县| 香河县| 河西区| 娄底市| 清流县| 台州市| 兰州市| 江西省| 永城市| 新巴尔虎左旗| 余庆县| 多伦县| 卢氏县| 陆河县| 高阳县| 济南市| 金溪县| 安远县| 普安县| 疏附县| 上杭县| 镇宁| 阿荣旗|