DB
-
[DB] ACID란?DB 2020. 3. 2. 13:26
ACID란? 데이터베이스 트랜잭션들이 안정적으로 수행된다는 것을 보장하기 위한 성질을 카리키는 약어 성질 4가지 원자성(Atomicity) 트랜잭션과 관련된 작업들이 부분적으로 실행되다가 중단되지 않는 것을 보장하는 능력 중간 단계까지 실행되고 실패하는 일이 없도록 하는것 일관성(Consistency) 트랜잭션이 실행을 성공적으로 완료하면 언제나 일관성 있는 데이터베이스 상태로 유지하는 것을 의미 고립성(Isolation) 트랜잭션 수행 시 다른 트랜잭션의 연산 작업이 끼어들지 못하도록 보장하는 것을 의미 트랜잭션 밖에 있는 어떤 연산도 중간 단계의 데이터를 볼 수 없음을 의미 트랜잭션 실행내역은 연속적이어야함을 의미 지속성(Durability) 성공적으로 수행된 트랜잭션은 영원히 반영되어야 함을 의미 ..
-
[DB] ORM이란?DB 2020. 3. 2. 11:17
ORM이란? Object Relational Mapping의 약자로 객체-관계 매핑 객체와 관계형 데이터베이스의 데이터를 자동으로 매핑해주는 것 객체 지향 프로그래밍은 클래스를 사용, 관계형 데이터베이스는 테이블을 사용 객체 모델과 관계형 모델 간에 불일치가 존재 ORM을 통해 객체 간의 관계를 바탕으로 SQL을 자동으로 생성하여 불일치를 해결 데이터베이스 데이터 객체 필드 객체를 통해 간접적으로 데이터베이스 데이터를 다룸 persistent API라고도함 ORM의 장단점 장점 객체 지향적인 코드로 인해 더 직관적이고 비즈니스 로직에 집중할 수 있게 해 줌 ORM을 이용하면 SQL Query가 아닌 직관적인 메서드로 데이터를 조작할 수 있어 개발자가 객체 모델로 프로그래밍하는 데 집중할 수 있음 선언, ..
-
[MySQL] MySQL character set 변경DB/MySQL 2019. 7. 10. 10:21
character set을 utf8로 변경하고 싶을 때는 my.ini파일을 수정하면 되는데 보통 my.ini의 경로가 C:\Program Files\MySQL\MySQL Server 5.7 에 있지만 없는 경우에는 C:\ProgramData\MySQL\MySQL Server 5.7에있는 my.ini를 수정 my.ini파일의 마지막 줄에 해당 내용을 추가 [client] default-character-set=utf8 [mysqld] collation-server = utf8_unicode_ci character-set-server = utf8 skip-character-set-client-handshake [mysql] default-character-set=utf8 [mysqldump] default-..