DDIP! 켠김에 서비스 런칭까지..
/
회의록
/
스키마 수정
Search
Share
📌
스키마 수정
회의 날짜
2021/08/11
회의 내용
회의 날짜_formatted
Aug 11
참여자
궁금증 리스트
•
로그 관리 질문
◦
어떤 로그를 저장해야하는지 궁금하다.
◦
그 로그들을 어디에 어떻게 저장하는지 궁금한다.
◦
유저들이 얼마나 어플리케이션을 켜는지를 관리하고 싶다.
◦
유저 활동 뿐만 아니라 서버 시스템 적으로도 어떤 로그를 저장해둬야하는지 궁금하다
•
postgresql 위도, 경도 datatype
Which data type for latitude and longitude?
In PostGIS, for points with latitude and longitude there is geography datatype. To add a column: alter table your_table add column geog geography; To insert data: insert into your_table (geog) values ('SRID=4326;POINT(longitude latitude)'); 4326 is Spatial Reference ID that says it's data in degrees longitude and latitude, same as in GPS.
Chapter 4. Using PostGIS: Data Management and Queries
The GIS objects supported by PostGIS are all the vector types defined in the "Simple Features for SQL 1.2.1" standard defined by the OpenGIS Consortium (OGC), and the ISO "SQL/MM Part 3: Spatial" document. In addition, PostGIS supports a raster type (no standards exist to follow), and a topology model (following an early draft ISO standard for topology that has not been published as yet).
•
forign key datatype
postgresql foreign key syntax
Assuming this table: CREATE TABLE students ( student_id SERIAL PRIMARY KEY, player_name TEXT ); There are four different ways to define a foreign key (when dealing with a single column PK) and they all lead to the same foreign key constraint: Inline without mentioning the target column: CREATE TABLE tests
PostgreSQL Foreign Key
Summary: in this tutorial, you will learn about PostgreSQL foreign key and how to add foreign keys to tables using foreign key constraints. A foreign key is a column or a group of columns in a table that reference the primary key of another table.
Show All
Search
Postgresql 데이터 타입
분류
종류
내용
숫자
Open
smallint
작은 범위의 정수,
2 bytes
(-32768 ~ +32767)
Open
integer
정수에 대한 일반적인 선택,
4 bytes
(-2147483648 ~ +2147483647)
Open
bigint
큰 범위의 정수,
8 bytes
(-9223372036854775808 ~ 9223372036854775807)
Open
decimal
사용자 지정 정밀도,
variable
, 정확(제한 없음)
Open
numeric
사용자 지정 정밀도,
variable
, 정확(제한 없음)
Open
real
가변 정밀도, 부정확,
4 bytes
(6자리 소수점 정밀도)
Open
double precision
가변 정밀도, 부정확,
8 bytes
(15자리 소수점 정밀도)
Open
serial
자동 증가 정수,
4 bytes
(1 ~ 2147483647)
Open
bigserial
큰 자동 증가 정수,
8 bytes
(1 ~ 9223372036854775807
화폐
Open
money
통화 금액,
8 bytes
(-92233720368547758.08 ~ +92233720368547758.07)
문자
Open
character varying(n), varchar(n)
제한이있는 가변 길이
Open
character(n), char(n)
고정 길이, 공백 채우기
Open
text
가변 길이 무제한
Open
"char"
1byte 내부 유형,
1 byte
Open
name
개체 이름의 내부 유형,
64 bytes
이진 데이터
Open
bytea
가변 길이 이진 문자열,
1 또는 4 byte와 실제 2진 문자열
날짜/시간
Open
timestamp [(p)][without time zone]
날짜와 시간 모두(시간대 없음),
8 bytes
Open
timestamp [(p)] with time zone
시간대가 있는 날짜와 시간 모두,
8 bytes
Open
date
날짜(시간 없음),
4 bytes
Open
time [(p)][without time zone]
시간(날짜 없음),
8 bytes
Open
time [(p)] with time zone
시간대만 포함,
12 bytes
Open
interval [fields][(p)]
시간 간격,
16 bytes
부울
Open
boolean
참 또는 거짓 상태,
1 byte
기하학
Open
point
비행기 위의 포인트,
16 bytes
, (x,y)
Open
line
무한 라인(완전히 구현되지 않음),
32 bytes
, ((x1,y1),(x2,y2))
Load more