[링크 : 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' 카테고리의 다른 글

자바 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
Object.clone()  (2) 2019.01.09
Posted by 구차니
Programming/jsp2020. 1. 15. 12:31

java/tomcat 으로 서버 호스팅 하는데도 많으니

정적웹을 java/tomcat으로 war 파일을 통해 deploy 가능하겠다 싶어서 검색

 

[링크 : https://10apps.tistory.com/118]

Posted by 구차니
Programming/Java(Spring)2020. 1. 15. 10:50

JDK 설치

$ sudo apt install openjdk-8-jdk

[링크 : https://daddyprogrammer.org/post/2062/openjdk-install-update-delete/]

 

예제 spring 프로젝트 다운로드(git)

$ git clone https://github.com/spring-guides/gs-rest-service.git

$ cd gs-rest-service/initial

$ ./gradlew bootRun

[링크 : https://spring.io/guides/gs/rest-service/]

 

http://localhost:8080/greeting

외부에서 접근하려면 ip로 바꾸고 8080 포트로 접속하면 된다.

다만.. 위에서 bootRun으로 했기 수정없이 실행했기에 greeting이 아직 생성되지 않아 접근이 되지 않는다.

gs-rest-service/initial/src/main/java/com/example/restservice/Greeting.java

package com.example.restservice;

public class Greeting {

private final long id;
private final String content;

public Greeting(long id, String content) {
this.id = id;
this.content = content;
}

public long getId() {
return id;
}

public String getContent() {
return content;
}
}

 

gs-rest-service/initial/src/main/java/com/example/restservice/GreetingController.java

package com.example.restservice;

import java.util.concurrent.atomic.AtomicLong;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class GreetingController {

private static final String template = "Hello, %s!";
private final AtomicLong counter = new AtomicLong();

@GetMapping("/greeting")
public Greeting greeting(@RequestParam(value = "name", defaultValue = "World") String name) {
return new Greeting(counter.incrementAndGet(), String.format(template, name));
}
}

+

위에서 GetMapping으로 greeting일 경우에

Parameter 이기에 greeting?name= 형식으로 값을 받되, 값이 없으면 기본값을 World로 지정해 주는 것으로 보인다.

@로 시작하는 annotation들은 조금 공부가 필요 할 듯 하다.

 

 

이렇게 파일 두개 추가해주고 gs-rest-service/initial 디렉토리로 돌아와

gradlew bootRun을 실행후

http://localhost:8080/greeting

http://localhost:8080/greeting?name=User

을 접속하면 15분(?) 강좌 끝

 

+

gradlwe bootRun은

gradle 도움말에 안나오는 걸 봐서는 spring boot 에서 추가된 taskName으로 추정된다.

[링크 : https://docs.gradle.org/current/userguide/command_line_interface.html]

 

+

[링크 : https://spring.io/guides/gs/spring-boot/] spring boot

[링크 : https://spring.io/guides/gs/accessing-data-rest/] JPA

[링크 : https://spring.io/guides/gs/accessing-data-mysql/] MYSQL

Posted by 구차니

정말로 정말로 올해는 아작내고 싶은 녀석들

 

1. python 3

[링크 : https://www.python.org/]

 

2. PyGL / PyCV

[링크 : https://sourceforge.net/projects/pycv/]

[링크 : http://pyopengl.sourceforge.net/]

 

3. DBMS 개론 및 튜닝

4. 개인 홈페이지 작성

 

4개나 되는게 욕심이 좀 많아 보이지만 DB 개론 까진 좀 아작을 내고

다음을 위해 사용할 칼로 갈아 놔야지... 안되겠다

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

출근길 일기?  (2) 2020.01.19
피곤한 하루  (2) 2020.01.18
오랫만에.. 정시보다 일찍 퇴근이면 머하냐..  (2) 2020.01.06
지치는 주말.. 아내도 힘든 주말  (0) 2020.01.05
새해의 시작..  (0) 2020.01.01
Posted by 구차니

dictionary 라고 하는 녀석은 node.js 에서 json 객체와 같은 녀석으로 보이는데..

아무튼 dictionary라고 하니 그렇게 표현을 해주자 -_-

 

dictionary는 {}

list는 []

tuple은 () 으로 표기되며

 

dictionary와 tuple은 [0]을 통해서 접근이 가능하고

dictionary는 ['apple'] 식으로 접근방법이 추가된다.

 

list는 []로 접근할 수 없으며, append(), pop() 등을 통해 stack이나 queue로 사용이 가능하다.

대신 list 답게 정렬등의 기능을 지원한다.

'Programming > python(파이썬)' 카테고리의 다른 글

pythonpath  (0) 2021.04.16
python yield  (0) 2021.04.07
python 반복문 for in range()  (0) 2020.01.11
python print 와 while 문  (0) 2020.01.11
오랫만에 한가로움?  (0) 2020.01.11
Posted by 구차니