-
항해 99 5기 WIL_4항해 99 2022. 2. 6. 23:38
▶ Weekly I Learned (회고)
이번 주도 열심히 달려온 한 주였다.
비록 지난 주차의 과제를 마무리 짓지 못하였지만
이번 주차의 과제를 빠르게 마무리 짓고 못 다한 것을 마무리 지을 예정이다.
이번 주차는 이해만 빠르면 금방 해결할 수 있는 것들이기에 가능할 것이라고 본다.
당장은 잘하지 못해도 또 실력이 늘거라 믿는다.
화이팅팅 :)
<CS 스터디>
[ORM]
Object Relational Mapping: 객체 관계 매핑
객체와 관계형 데이터베이스의 데이터를 자동으로 매핑(연결)해 주는 것,
객체지향 프로그래밍에선 클래스를 사용한다면 관계형 데이터는 테이블 사용 -> 객체 모델과 관계 모델 사이에 불일치 생김
-> ORM이 객체간의 관계를 고려하여 SQL을 자동으로 생성함으로써 불일치 해결
장점
1) 코드를 SQL식이 아닌 객체지향적으로 짤 수 있어 더욱 직관적이고 비즈니스 로직 자체에 더 집중할 수 있게 해줌
2) 재사용 및 유지보수의 편리성이 증가한다.
3) DBMS에 대한 종속성이 줄어든다.
단점
1) ORM으로만 완벽한 서비스를 구현하기는 어렵다.
2) 프로시저가 많은 시스템에선 ORM의 객체 지향적인 장점을 활용하기 어렵다.
(객체지향적 프로그래밍을 하려면 프로시저들을 객체로 생성한 다음 외부에서 호출해야하는데 이미 프로시저가 많은 경우그 작업량이 많아져 생산성이 저하될 수 있다. 또한 객체화하는 과정에서 논리구조나 값이 바뀌는 등의 리스크가 있을 수 있다.)
출처:
https://gmlwjd9405.github.io/2019/02/01/orm.html
https://geonlee.tistory.com/207
[SQL vs NoSQL]
SQL (Structured Query Language)
흔히 말하는 관계형데이터 베이스에 해당한다. 대표적인 예시로는 MySQL,
정해진 스키마가 있음, 이 스키마에 따른 데이터만 테이블에 저장 가능
하나의 테이블에서 중복없이 하나의 데이터만을 다룸
수직적 확장 ex: 단순히 데이터 베이스의 서버 성능 향상 (ex: CPU 업그레이드)
NoSQL (Not Only Structured Query Language)
비관계형 데이터베이스를 말한다. 대표적인 예시로는 Mongo DB,
구조화되지 않은 데이터에 대해 동적 스키마를 제공한다. (즉, 정해진 스키마도 없고 관계도 없다.)
수평적 확장 ex: 더 많은 서버가 추가되고 데이터베이스가 전체적으로 분산됨
SQL의 레코드 (행)을 NoSQL에서는 document라고 부른다.
상세사항은 아래 출처를 참고해보자.
출처
https://gyoogle.dev/blog/computer-science/data-base/SQL%20&%20NOSQL.html
▶ 공부 시 참고 링크들
https://thinkforthink.tistory.com/129
https://7942yongdae.tistory.com/48
'항해 99' 카테고리의 다른 글
항해 99 5기 TIL_30 (0) 2022.02.09 항해 99 5기 TIL_29 (0) 2022.02.07 항해 99 5기 TIL_28 (0) 2022.02.06 항해 99 5기 TIL_27 (0) 2022.02.06 항해 99 5기 TIL_26 (0) 2022.02.05