Programming/node.js2020. 1. 19. 16:42

DB에서 하는거나 was에서 하는거랑 좀 차이가 있다면 있을수 있지만

postgresql의 경우 crypto 모듈을 설치해야 하는 문장 하나를 관리해줘야 하니

보안상 문제나 구조적 문제가 없다면 WAS에서 처리하는 것도 나쁘진 않다는 생각이 든다.

 

crypto 모듈은 기본 모듈이라 npm install을 해주지 않아도 된다.

const crypto = require('crypto');

const secret = 'abcdefg';
const hash = crypto.createHmac('sha256', secret)
                   .update('I love cupcakes')
                   .digest('hex');
console.log(hash);
// Prints:
//   c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e

 

[링크 : https://nodejs.org/api/crypto.html]

 

+

[링크 : https://victorydntmd.tistory.com/33]

'Programming > node.js' 카테고리의 다른 글

node.js promise  (0) 2020.01.20
node.js cookie 관련 함수들  (0) 2020.01.19
node.js xpath 그리고 boolean  (0) 2019.12.17
node.js JWT with refresh token  (0) 2019.12.10
node.js synchornous file write  (0) 2019.11.06
Posted by 구차니

언제쯤 피곤하지 않고 개운하게 깰수 있을까..

Posted by 구차니

erdcloud를 써보는데

 

한개와 오직 한개만 이라는게 있어서 찾아 보는중.

 

 

아래 글에 의하면.. 한개는 불특정 다수에 대한 1:1 관계이고

one to only one은 로그인 계정 처럼 1:1 관계이지만 불특정 1인에게 주어지는게 아닌

정말 유일한 한 사람에게 주어지는 1:1 관계로 해석하면 될 것으로 보인다.

[링크 : https://stackoverflow.com/questions/33781451/crows-feet-one-vs-one-and-only-one]

[링크 : https://math.stackexchange.com/questions/247380/analogy-between-one-and-only-one-and-if-and-only-if]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

drop database와 postgres  (0) 2020.02.04
union / intersect / minus  (0) 2020.01.22
EA(Enterprise Architecture)  (0) 2020.01.17
데이터베이스 모델링  (0) 2020.01.17
subquery와 inner join  (0) 2020.01.16
Posted by 구차니

EA를 수립한다 이런 문장이 나와서 찾아보니 저런 약어인듯.

 

[링크 : https://blog.naver.com/jvioonpe/220227180562]

[링크 : https://blog.naver.com/jvioonpe/220228298326]

 

 

한글로는 전사 아키텍쳐 이렇게 쓰기도 하는 듯

[링크 : http://www.dbguide.net/db.db?cmd=view&boardUid=12723&boardConfigUid=9&categoryUid=216&boardIdx=25&boardStep=1]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

union / intersect / minus  (0) 2020.01.22
one to one , one to only one  (0) 2020.01.17
데이터베이스 모델링  (0) 2020.01.17
subquery와 inner join  (0) 2020.01.16
pg_dump (postgresql backup, 백업)  (0) 2020.01.15
Posted by 구차니

 

[링크 : http://www.dbguide.net/db.db?boardUid=148404&boardConfigUid=9&boardIdx=132]

[링크 : https://blog.naver.com/tomatosoft/220853122078]

[링크 : https://blog.naver.com/tomatosoft/220857559986] 논리물리 설계

[링크 : http://wiki.gurubee.net/pages/viewpage.action?pageId=13664394]

[링크 : http://www.incodom.kr/데이터모델링]

[링크 : https://wikidocs.net/1208]

 

[링크 : https://www.youtube.com/playlist?list=PLuHgQVnccGMDF6rHsY9qMuJMd295Yk4sa]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

one to one , one to only one  (0) 2020.01.17
EA(Enterprise Architecture)  (0) 2020.01.17
subquery와 inner join  (0) 2020.01.16
pg_dump (postgresql backup, 백업)  (0) 2020.01.15
postgresql 장치에 남은 공간이 없음  (0) 2020.01.15
Posted by 구차니

두개가 서로 변환이 가능한 형태?

 

[링크 : https://www.essentialsql.com/subquery-versus-inner-join/]

[링크 : https://www.essentialsql.com/what-is-the-difference-between-a-join-and-subquery/]

 

 

Replacing joins with subqueries

[링크 : http://infocenter.sybase.com/...=/com.sybase.infocenter.dc00169.1510/html/iqperf/X100950.htm]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

EA(Enterprise Architecture)  (0) 2020.01.17
데이터베이스 모델링  (0) 2020.01.17
pg_dump (postgresql backup, 백업)  (0) 2020.01.15
postgresql 장치에 남은 공간이 없음  (0) 2020.01.15
postgresql 테이블 크기  (0) 2020.01.15
Posted by 구차니

백업할때 sql/txt로 나오게 되니 압축하면서 하면 용량을 절약할 수 있다.

 

pg_dump dbname | gzip > filename.gz
Reload with:

gunzip -c filename.gz | psql dbname
or:

cat filename.gz | gunzip | psql dbname

[링크 : https://www.postgresql.org/docs/9.1/backup-dump.html]

[링크 : https://idchowto.com/?p=45509]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

데이터베이스 모델링  (0) 2020.01.17
subquery와 inner join  (0) 2020.01.16
postgresql 장치에 남은 공간이 없음  (0) 2020.01.15
postgresql 테이블 크기  (0) 2020.01.15
postgresql data_directory  (0) 2020.01.13
Posted by 구차니

스토리지 전체를 다 쓰기 전에 멈출줄 알았는데

다 쓰고 용량 없으니 DBMS 자체가 셧다운 되어버린다.

 

복구하는 법은.. 더 큰 볼륨으로 이동시키기 정도 뿐인걸로 검색이 되는데 다른 방법은 없는 건지 모르겠다.

[링크 : https://dba.stackexchange.com/questions/167515/dealing-with-disk-space-full-in-postgresql]

[링크 : https://www.postgresql.org/docs/9.1/disk-full.html]

[링크 : https://www.postgresql.org/docs/9.1/manage-ag-tablespaces.html]

 

+

 

[링크 : http://postgresql.kr/docs/9.4/continuous-archiving.html]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

subquery와 inner join  (0) 2020.01.16
pg_dump (postgresql backup, 백업)  (0) 2020.01.15
postgresql 테이블 크기  (0) 2020.01.15
postgresql data_directory  (0) 2020.01.13
postgres table의 물리적 용량 확인하기  (0) 2020.01.13
Posted by 구차니

테이블의 물리적 크기를 측정하는 방법

[링크 : https://www.a2hosting.com/.../postgresql/determining-the-size-of-postgresql-databases-and-tables]

 

table 별 table / index / toast(이게 먼지 모르겠음) 용량 byte와 MB 단위로 나오는 쿼리문

SELECT *, pg_size_pretty(total_bytes) AS total
    , pg_size_pretty(index_bytes) AS INDEX
    , pg_size_pretty(toast_bytes) AS toast
    , pg_size_pretty(table_bytes) AS TABLE
  FROM (
  SELECT *, total_bytes-index_bytes-COALESCE(toast_bytes,0) AS table_bytes FROM (
      SELECT c.oid,nspname AS table_schema, relname AS TABLE_NAME
              , c.reltuples AS row_estimate
              , pg_total_relation_size(c.oid) AS total_bytes
              , pg_indexes_size(c.oid) AS index_bytes
              , pg_total_relation_size(reltoastrelid) AS toast_bytes
          FROM pg_class c
          LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
          WHERE relkind = 'r'
  ) a
) a;

[링크 : https://wiki.postgresql.org/wiki/Disk_Usage]

 

+

LZ 압축 기술로 압축하여 저장하는 공간인가?

 

TOAST(대형 속성 저장 기술:The Oversized-Attribute Storage Technique)

[링크 : http:// http://www.postgresql.org/docs/9.4/static/storage-toast.html]

[링크 : https://data-rider.blogspot.com/2015/07/postgresql-toast.html]

Posted by 구차니
Programming/Java2020. 1. 15. 13:01

개념은 대충 알았지만.. 시대가 바뀌어서 그런가..

예전의 맨날 돌리고 돌리는 orbit 보다는 구체화된 예로 이해하기가 쉬운 시대가 되었네.

 

[링크 : https://gmlwjd9405.github.io/2018/07/05/oop-features.html]

[링크 : https://gmlwjd9405.github.io/2018/07/05/oop-solid.html]

'Programming > Java' 카테고리의 다른 글

java 람다, 클로저  (0) 2025.01.31
자바 annotation  (0) 2020.06.16
java cipher  (0) 2019.11.25
jaxb - Java Architecture for XML Binding  (0) 2019.06.25
jar 실행하기  (0) 2019.01.15
Posted by 구차니