TypeORM

Minions·2023년 3월 28일
0

TypeORM

목록 보기
1/2
post-thumbnail

개요

ORM

TypeORM에 대해 공부하기 전, ORM에 대해 간단한 이해가 필요하다고 느꼈다.

ORM이란? Object-Relational Mapping이라고 하여 객체와 관계를 연결해주는 것이다.
글로만 보면 이해가 되지 않아 간단한 그림과 함께 작성을 이어가야겠다.

그림1 Object Relational Mapping

위 그림을 보면 프로그래밍 언어의 객체와 관계형 데이터베이스의 데이터를 자동으로 연결해주는 도구라고 생각하면 된다.

TypeORM

이제 이어서 TypeORM에 대해 정리를 시작해본다. 먼저, 공식 홈페이지에서 TypeORM을 어떻게 설명하는지 봤다.

TypeORM is an ORM that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic, React Native, NativeScript, Expo, and Electron platforms and can be used with TypeScript and JavaScript (ES5, ES6, ES7, ES8). Its goal is to always support the latest JavaScript features and provide additional features that help you to develop any kind of application that uses databases - from small applications with a few tables to large scale enterprise applications with multiple databases.

TypeORM supports both Active Record and Data Mapper patterns, unlike all other JavaScript ORMs currently in existence, which means you can write high quality, loosely coupled, scalable, maintainable applications the most productive way.

TypeORM is highly influenced by other ORMs, such as Hibernate, Doctrine and Entity Framework.

간단하게 정리하자면, "TypeORM은 다양한 플랫폼에서 실행할 수 잇으며, TypeScript 및 JavaScript와 함께 사용할 수 있다. 또한, Active Record PatternData Mapper Pattern을 모두 지원하며, 다른 ORM과 다르게 높은 품질, 결합도가 낮으며, 확장 가능하고 유지보수가 쉬운 애플리케이션을 가장 효율적인 방식으로 작성할 수 있다. 마지막으로 Hibernate, Doctrine, Entity Framework와 같은 OR에 큰 영향을 받았다."라고 적혀있다.

여기서 핵심적인 내용은 Active Record PatternData Mapper Pattern이라고 생각이 된다. 두 가지 패턴은 이어지는 포스팅에 작성하도록 하겠다.

참고

typeorm 공식 사이트 : https://typeorm.io/
ORM 사진 : https://hanamon.kr/orm%EC%9D%B4%EB%9E%80-nodejs-lib-sequelize-%EC%86%8C%EA%B0%9C/

profile
Junior Software Deveoper

0개의 댓글