BASE

TypeORM

TypeORM

Database / data tool · Free

An ORM for TypeScript and JavaScript with entities, repositories, and migrations, supporting multiple SQL drivers.

Also known as: typeorm/typeorm; typeorm; typeorm-orm

Resource illustration: TypeORM

Open resource ↗

What you can use for free

Code and local use under MIT.

Paid features and costs

Compute, your own hosting, and external services are paid for separately if selected.

Access and limitations

Code and local use under MIT. Compute, your own hosting, and external services are paid for separately if selected.

Use cases

  • Connect application entities to an SQL database
  • Add a migration and perform operations through an entity repository

Example workflow

A possible workflow; this is not a report of hands-on testing.

Connect application entities to an SQL database.

Before you start

  • A schema, test dataset, and queries.
  • A supported database or runtime.

Steps

  1. Define entities, relationships, and the database connection.
  2. Add a migration and perform operations through an entity repository.
  3. Check schema changes, indexes, and data recovery.

Check your result

  • Query results match the reference data.
  • Check access permissions, backup recovery, and load before production use.

Choosing TypeORM

Connect application entities to an SQL database

Choose this when

  • Connect application entities to an SQL database
  • Add a migration and perform operations through an entity repository

Requirements

  • DataSource requires the selected database system's type; entities specifies the classes or schemas in use. Different drivers have their own additional settings.

Things to consider

  • Costs and limits of free use: Compute, your own hosting, and external services are paid for separately if selected.
  • Terms of use: MIT: code; dependencies have separate licenses.
  • The documentation warns against dropSchema and synchronize in production because they can destroy data. Check the capabilities and parameters of the particular database with its corresponding driver.

Frequently asked questions

What can you use for free in TypeORM?

Code and local use under MIT.

What additional costs might arise with TypeORM?

Compute, your own hosting, and external services are paid for separately if selected.

What terms of use matter for TypeORM?

MIT: code; dependencies have separate licenses.

How do you get started with TypeORM?

Define entities, relationships, and the database connection. Add a migration and perform operations through an entity repository. Check schema changes, indexes, and data recovery.

How do TypeORM's two entity approaches differ?

Data Mapper uses a repository from DataSource: saving and querying take place through it. Active Record extends BaseEntity and provides operations directly on the entity class and instances; the README shows both approaches.

License

MIT: code; dependencies have separate licenses.

MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.

License terms

Technologies and topics

  • TypeORM
  • database
  • Development

Sources

Other resources