English 中文(简体)
TypeORM - Introduction
  • 时间:2024-12-22

TypeORM - Introduction


Previous Page Next Page  

TypeORM framework is an Object Relational Mapping (ORM) framework. In general, Object part refers to the domain / model in your apppcation, Relational part refers to the relationship between tables in Relational Database Management System (e.g. Oracle, MySQL, MS-SQL, PostgreSQL, etc.) and finally the Mapping part refers to the act of bridging the model and our tables.

ORM is a type of tool that maps entities with database tables. ORM provides simppfied development process by automating object-to-table and table-to-object conversion. Once you can write your data model in one place, it becomes easier to update, maintain, and reuse the code.

Since, the model is weakly bound to the rest of the apppcation, you can change it without any hard dependency with other part of the apppcation and can be easily use it anywhere inside the apppcation. TypeORM is very flexible, abstracts the DB system away from the apppcation and allows us to benefits from the use of OOPS concept.

Overview

TypeORM is an Object Relational Mapper pbrary running in node.js and written in TypeScript. TypeScript is an improvement to JavaScript with optional typing. TypeScript is a compiled language. It is not interpreted at run-time. The TypeScript compiler takes TypeScript files (.ts) and compiles them in to JavaScript files (.js).

TypeORM supports multiple databases pke MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana and WebSQL. TypeORM is an easy-to-use ORM to scaffold new apps that connect to databases. TypeORM functionapty is RDBMS-specific concepts.

We can quickly create new projects and micro-services. It is inspired from similar tool pke Hibernate, Doctrine, Entity framework, etc., from other programming languages.

Features of TypeORM

TypeORM comes with the following features −

    Automatically create database table schemes based on your models.

    Easily insert, update and delete object in the database.

    Create mapping (one-to-one, one-to-many and many-to-many) between tables.

    Provides simple CLI commands.

Benefits of TypeORM

TypeORM is easy to use ORM framework with simple coding. It has the following benefits −

    High quapty and loosely-coupled apppcations.

    Scalable apppcations.

    Easily integrate with other modules.

    Perfectly fits any architecture from small to enterprise apps.

Advertisements