chapter 4 Flashcards

(6 cards)

1
Q

What is ORM in the backend?

A

ORM means Object-Relational Mapping. It helps to work with SQL databases by converting tables into objects in your code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is ODM in the backend?

A

ODM means Object-Document Mapping. It helps to work with NoSQL databases (like MongoDB) by converting documents into objects in your code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the main difference between ORM and ODM?

A

ORM is for SQL databases (tables, rows, columns).

ODM is for NoSQL databases (documents, collections).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Give examples of ORM libraries.

A

Sequelize (Node.js), SQLAlchemy (Python), Hibernate (Java).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Give examples of ODM libraries.

A

Mongoose (Node.js), MongoEngine (Python).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why use ORM or ODM?

A

To avoid writing raw SQL/NoSQL queries. You can work with objects directly in your code, which saves time and reduces errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly