-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_table.sql
61 lines (55 loc) · 1.38 KB
/
create_table.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
-- USER
-- id
-- name
-- social
-- state
-- init_time
-- login_time
-- logout_time
-- save_status
CREATE TABLE PUBLIC.USER (
id serial PRIMARY KEY,
name VARCHAR ( 255 ),
password VARCHAR ( 255 ) NOT NULL,
email VARCHAR ( 255 ),
social VARCHAR ( 255 ),
state VARCHAR ( 255 ),
create_time TIMESTAMP NOT NULL,
login_time TIMESTAMP,
logout_time TIMESTAMP,
save_status BOOLEAN NOT NULL
);
-- basic bord
CREATE TABLE PUBLIC.BOARD (
id serial PRIMARY KEY,
description TEXT
);
-- 리테일 스토어 erd
-- https://www.freeprojectz.com/entity-relationship/retail-store-management-system-er-diagram
-- 이커머스 erd
CREATE TABLE PUBLIC.LOGIN (
login_id VARCHAR ( 100 ) PRIMARY KEY,
login_role_id VARCHAR ( 100 ),
login_username VARCHAR ( 100 ),
user_password VARCHAR ( 100 )
);
create table PUBLIC.ROLES (
role_id varchar ( 100 ) primary key ,
role_name varchar ( 100 ),
role_desc varchar ( 255 )
);
create table PUBLIC.PAYMENT (
pay_id varchar ( 100 ) primary key ,
pay_amt varchar ( 100 ),
pay_stu_id varchar ( 100 ),
pay_date date,
pay_desc varchar ( 255 )
);
create table PUBLIC.PRODUCT (
pro_id varchar ( 100 ) primary key ,
pro_num numeric,
pro_cus_id varchar ( 100 ),
pro_desc varchar ( 255 ),
pro_items varchar ( 255 ),
pro_type varchar ( 100 )
);