반응형 DB19 [PostgreSQL] 기본 데이터 타입 정리 - JSON Character types / why should we use char instead of varchar? Numeric types Boolean types Temporal types UUID for storing Universally Unique Identifiers Array for storing array strings, numbers, etc... JSON stores JSON data hstore stores key-value pair User defined data JSON JSON의 주 사용처는 서버와 웹 애플리케이션간 데이터 전송이다. 다른 형식과는 다르게 JSON은 사람이 읽을 수 있는 text 형식이다. 테이블 생성 CREATE TABLE orders ( id serial NOT NU.. DB 2020. 9. 1. [PostgreSQL] 기본 데이터 타입 정리 - Array Character types / why should we use char instead of varchar? Numeric types Boolean types Temporal types UUID for storing Universally Unique Identifiers Array for storing array strings, numbers, etc... JSON stores JSON data hstore stores key-value pair User defined data Array postgresql 에서는 column을 including built-in type, user-defined type, enumerated type 등 모든 유효한 데이터 유형의 배열로 정의할 수 있다. 테이블 생성 C.. DB 2020. 9. 1. [PostgreSQL] 기본 데이터 타입 정리 - UUID , Serial Character types / why should we use char instead of varchar? Numeric types Boolean types Temporal types UUID for storing Universally Unique Identifiers Array for storing array strings, numbers, etc... JSON stores JSON data hstore stores key-value pair User defined data UUID, Serial 암호화 알고리즘을 사용하여 만든 128비트짜리 문자열이다. serial 타입보다 훨씬 복잡하다. 40e6215d-b5c6-4896-987c-f30f3678f608 6ecd8c99-4036-403d-bf84-.. DB 2020. 9. 1. [PostgreSQL] 기본 데이터 타입 정리 - Temporal types Character types / why should we use char instead of varchar? Numeric types Boolean types Temporal types UUID for storing Universally Unique Identifiers Array for storing array strings, numbers, etc... JSON stores JSON data hstore stores key-value pair User defined data Temporal types - time 8 bytes, 00:00:00~24:00:00 범위로 들어가게된다. 기본적인 포멧 column_name TIME; HH:MM HH:MM:SS HHMMSS 01:02 01:02:03 0102.. DB 2020. 9. 1. [PostgreSQL]기본 데이터 타입 정리 - Boolean types Character types / why should we use char instead of varchar? Numeric types Boolean types Temporal types UUID for storing Universally Unique Identifiers Array for storing array strings, numbers, etc... JSON stores JSON data hstore stores key-value pair User defined data Boolean true, false, null 세개의 value 가진다. TRUE → true, 't', 'true' 'y', 'yes', '1' FALSE → false, 'f', 'false', 'n', 'no', '0' DB 2020. 9. 1. [PostgreSQL] 기본 데이터 타입 - Numeric types Character types / why should we use char instead of varchar? Numeric types Boolean types Temporal types UUID for storing Universally Unique Identifiers Array for storing array strings, numbers, etc... JSON stores JSON data hstore stores key-value pair User defined data Integer Name Storage Size Min Max smallint 2byte -32,768 +32,767 integer ( = int ) 4byte -2,147,483,648 +2,147,483,647 bigint 8b.. DB 2020. 8. 17. [PostgreSQL] 기본 데이터 타입 - Character types Character types / why should we use char instead of varchar? Numeric types Boolean types Temporal types UUID for storing Universally Unique Identifiers Array for storing array strings, numbers, etc... JSON stores JSON data hstore stores key-value pair User defined data Character types character varying(n), varchar(n) - 가변적인 길이를 갖는다. -> 최대 한도(n) 이내에서 입력된 데이터에 따라 길이가 변한다. (8000byte까지) character(n).. DB 2020. 8. 17. 이전 1 2 다음 반응형