일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 구현
- spring boot
- 알고리듬
- Algorithm
- Vue.js
- SWEA
- SQL
- 시뮬레이션
- DFS
- Back tracking
- Trie
- django
- 코딩테스트
- programmers
- boj
- gpdb
- aws
- GitHub
- Priority Queue
- JavaScript
- 코테
- Bruth Force
- Linked list
- CSV
- hash table
- Data Structure
- BFS
- 모의SW역량테스트
- Python
- 알고리즘
- Today
- Total
목록Dev./DB (3)
hotamul의 개발 이야기

Path Enumeration Adjacency Lists(대댓글 기능 데이터 모델링 #1 (Adjacency List) 참고)는 트리에서 주어진 노드의 여러 계층의 부모/자식 노드를 한 번에 검색하는데 비용이 많이 든다. Path Enumeration은 이러한 문제를 문자열을 이용해 각 노드의 속성으로 저장함으로써 해결할 수 있다. CREATE TABLE Comments ( comment_id SERIAL PRIMARY KEY, path VARCHAR(1000), post_id BIGINT UNSIGNED NOT NULL, author BIGINT UNSIGNED NOT NULL, comment_date DATETIME NOT NULL, comment TEXT NOT NULL, FOREIGN KEY (..

사용자들이 댓글을 달고 서로에게 대답하면서 토론 스레드를 만들 수 있는 서비스를 개발할 때 각 댓글들이 어떤 댓글의 답변인지 알 수 있도록 아래와 같이 parent_id를 이용해서 간단하게 Comments 테이블을 구성할 수 있다. CREATE TABLE Comments ( comment_id SERIAL PRIMARY KEY, parent_id BIGINT UNSIGNED, comment TEXT NOT NULL, FOREIGN KEY (parent_id) REFERENCES Comments(comment_id) ); 그런데 딱 봐도 위와 같은 테이블 구성은 하나의 SQL 쿼리로 모든 댓글 연결들을 조회하는 것이 어려워 보인다. 바로 자식 댓글까지는 쉽게 얻을 수 있지만, 댓글 스레드는 무한히 생성될 ..
Isolation level of Transactions In a select transaction, several problems might occur: Dirty Read: Other transactions can see changes from the current transaction, even if the changes are not yet committed Non-Repeatable Read: Repeated attempts to read the same data results in different result sets Phantom Read: By inserting, modifying or deleting data, other transactions will see different resu..