Tạo cơ sở dữ liệu PostgreSQL
Darryl Reeves
Industry Assistant Professor, New York University

Cung cấp môi trường riêng cho người dùng cơ sở dữ liệu

Tổ chức đối tượng CSDL theo nhóm liên quan

public là schema mặc định trong PostgreSQLCREATE TABLE topic (
id serial PRIMARY KEY,
description TEXT NOT NULL
);
public.topic
CREATE SCHEMA schema_name;
CREATE SCHEMA division1;
CREATE TABLE division1.school (
id serial PRIMARY KEY,
name TEXT NOT NULL,
mascot_name TEXT,
num_scholarships INTEGER DEFAULT 0
);
Tạo cơ sở dữ liệu PostgreSQL