Coursera Django Module 2 ORM Flashcards

1
Q

What are the two paradigms that model data differently?

A

The Object-Oriented Programming (OOP) paradigm and the SQL paradigm model data differently.

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

What is Object Relational Mapping (ORM)?

A

Object Relational Mapping (ORM) is a technique that bridges the gap between Object-Oriented Programming (OOP) and SQL by mapping and transferring data stored in a relational database as rows into objects or objects into rows.

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

What does ORM allow developers to do?

A

ORM allows developers to use Object-Oriented Programming (OOP) to query and manipulate data by transferring objects into rows and rows into objects.

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

What is Django ORM?

A

Django ORM is a Python ORM component that belongs to the Django web application framework.

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

How does Django ORM speed up database development?

A

Django ORM speeds up database development by defining maps to a database table for each Django model, automatically creating tables once models and fields are defined.

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

What does each Django field map to?

A

Each Django field maps to a column type in the database.

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

What operations can Django APIs perform on database objects?

A

Django APIs can perform Create, Read, Update, and Delete (CRUD) operations on database objects.

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

How do you insert an object into the database in Django?

A

To insert an object into the database in Django, you create an object and call the model’s save method to insert it into the database as a record.

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

How do you read objects using Django Model API?

A

To read objects using Django Model API, you must construct a QuerySet using a Manager on your model class.

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

What are the ways to update database records in Django?

A

There are several ways to update database records in Django by updating objects.

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

How do you delete records in a database using Django ORM?

A

To delete records in a database using Django ORM, you call the Delete method on a model object or query set.

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