Need advice about which tool to choose?Ask the StackShare community!
Doctrine 2 vs Sequelize: What are the differences?
Doctrine 2: An object-relational mapper (ORM) for PHP 5.3.2+ that provides transparent persistence for PHP objects. Doctrine 2 sits on top of a powerful database abstraction layer (DBAL). One of its key features is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), inspired by Hibernates HQL; Sequelize: Easy-to-use multi sql dialect ORM for Node.js & io.js. Sequelize is a promise-based ORM for Node.js and io.js. It supports the dialects PostgreSQL, MySQL, MariaDB, SQLite and MSSQL and features solid transaction support, relations, read replication and more.
Doctrine 2 and Sequelize can be categorized as "Object Relational Mapper (ORM)" tools.
"Great abstraction, easy to use, good docs" is the top reason why over 9 developers like Doctrine 2, while over 17 developers mention "Good ORM for node.js" as the leading cause for choosing Sequelize.
Sequelize is an open source tool with 19.2K GitHub stars and 3.01K GitHub forks. Here's a link to Sequelize's open source repository on GitHub.
According to the StackShare community, Sequelize has a broader approval, being mentioned in 38 company stacks & 33 developers stacks; compared to Doctrine 2, which is listed in 35 company stacks and 12 developer stacks.
Pros of Doctrine 2
- Great abstraction, easy to use, good docs14
- Object-Oriented10
- Easy setup7
Pros of Sequelize
- Good ORM for node.js42
- Easy setup31
- Support MySQL & MariaDB, PostgreSQL, MSSQL, Sqlite20
- Open source14
- Free13
- Promise Based11
- Recommend for mongoose users4
- Atrocious documentation, buggy, issues closed by bots3
- Typescript3
Sign up to add or upvote prosMake informed product decisions
Cons of Doctrine 2
Cons of Sequelize
- Docs are awful30
- Relations can be confusing9