Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
17 views

Django Application Development With SQL and Databases Final

The document consists of multiple-choice and checkbox questions related to Full-stack Django Development, covering topics such as the MVT pattern, QuerySets, Django views, and admin customization. Each question includes options, correct answers, and feedback for incorrect responses. The questions are designed to test knowledge on Django's functionality, commands, and best practices.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Django Application Development With SQL and Databases Final

The document consists of multiple-choice and checkbox questions related to Full-stack Django Development, covering topics such as the MVT pattern, QuerySets, Django views, and admin customization. Each question includes options, correct answers, and feedback for incorrect responses. The questions are designed to test knowledge on Django's functionality, commands, and best practices.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 91

Question 1 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

Which component in the Django MVT pattern is responsible for handling the logic associated with
processing HTTP requests and returning HTTP responses?

A: Model

Feedback: Incorrect. The Model is responsible for managing the data and the database.

*B: View

Feedback: Correct! Views handle the logic for processing requests and returning responses.

C: Template

Feedback: Incorrect. Templates are responsible for rendering the HTML content.

D: Admin

Feedback: Incorrect. The Admin site is used to manage the app's data but not for handling HTTP
requests.

Question 2 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

Which method would you use to filter a Django QuerySet to only include objects with a specific field
value?

*A: filter

Feedback: Correct! The filter method is used to filter QuerySets based on specific field values.

B: exclude

Feedback: Incorrect. The exclude method is used to exclude objects with specific field values.

C: annotate

Feedback: Incorrect. The annotate method is used to aggregate values based on specific field values.

D: values
Feedback: Incorrect. The values method is used to return dictionaries instead of model instances.

Question 3 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

Which component in the Django Model-View-Template pattern is responsible for handling the logic of
the application?

A: Model

Feedback: Incorrect. The Model is responsible for handling the data and database interactions.

*B: View

Feedback: Correct! The View in Django is responsible for handling the logic of the application.

C: Template

Feedback: Incorrect. The Template is responsible for rendering the HTML content.

D: Controller

Feedback: Incorrect. Django does not have a distinct Controller; the View handles the control logic.

Question 4 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

Which method in Django is used to retrieve objects that are related to each other through a many-to-
many relationship?

A: select_related

Feedback: select_related is used for foreign key relationships, not many-to-many relationships.

*B: prefetch_related

Feedback: Correct! prefetch_related is used to retrieve objects in a many-to-many relationship


efficiently.

C: filter

Feedback: filter is used to filter QuerySets, not specifically for many-to-many relationships.

D: aggregate
Feedback: aggregate is used for aggregation functions, not for retrieving many-to-many related objects.

Question 5 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

In the Model-View-Template (MVT) pattern used by Django, which component is responsible for
rendering the user interface?

*A: Template

Feedback: Correct! The Template component is responsible for rendering the user interface in Django's
MVT pattern.

B: Model

Feedback: Incorrect. The Model component is responsible for handling the data and business logic.

C: View

Feedback: Incorrect. The View component is responsible for handling the logic of the application.

D: Controller

Feedback: Incorrect. Django uses the MVT pattern, where the Controller role is split between the View
and the Template.

Question 6 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

Which method would you use to combine QuerySets in Django?

*A: union

Feedback: Correct! The union method is used to combine multiple QuerySets in Django.

B: intersect

Feedback: Incorrect. The intersect method is not used for combining QuerySets in Django.

C: difference

Feedback: Incorrect. The difference method is not applicable for combining QuerySets in Django.

D: concat
Feedback: Incorrect. The concat method is not used for combining QuerySets in Django.

Question 7 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

Which of the following best describes the role of a Django view?

*A: A function that receives a web request and returns a web response

Feedback: Correct! A Django view is a function that receives a web request and returns a web response.

B: A template engine for rendering HTML pages

Feedback: Incorrect. A template engine is responsible for rendering HTML pages.

C: A model that defines the structure of the database

Feedback: Incorrect. A model is responsible for defining the structure of the database.

D: A URL mapping tool

Feedback: Incorrect. URLconf is responsible for mapping URLs to views.

Question 8 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

What is the primary purpose of Django views?

A: To define the data structure

Feedback: Incorrect. This is the responsibility of Django models.

B: To handle user authentication

Feedback: Incorrect. User authentication is handled by Django's authentication system.

*C: To manage HTTP requests and responses

Feedback: Correct! Django views manage HTTP requests and responses.

D: To create and manage the database

Feedback: Incorrect. Database management is handled by Django models and the ORM.
Question 9 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

Which command is used to create a new Django app within an existing Django project?

*A: django-admin startapp

Feedback: Correct! The 'django-admin startapp' command is used to create a new Django app within an
existing project.

B: django-admin startproject

Feedback: Incorrect. 'django-admin startproject' is used to create a new Django project, not a new app
within a project.

C: django-admin runserver

Feedback: Incorrect. 'django-admin runserver' is used to run the development server, not to create a new
app.

D: django-admin makemigrations

Feedback: Incorrect. 'django-admin makemigrations' is used to create new migrations based on the
changes you have made to your models.

Question 10 - checkbox, shuffle, partial credit, medium

Question category: Module: Full-stack Django Development

Which of the following are valid ways to customize the admin interface in Django?

*A: Overriding admin templates

Feedback: Correct! You can override the default admin templates to customize the admin interface.

*B: Adding custom CSS and JavaScript

Feedback: Correct! You can add custom CSS and JavaScript to the Django admin interface.

C: Editing the Django core files

Feedback: Incorrect. Editing the Django core files is not recommended as it can lead to maintenance
issues.

*D: Using third-party admin themes


Feedback: Correct! You can use third-party admin themes to change the appearance of the Django
admin.

Question 11 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

Which of the following files is created when starting a new Django project?

*A: settings.py

Feedback: Correct! settings.py is one of the core files created when starting a new Django project.

B: views.py

Feedback: Incorrect. views.py is created within an app, not at the project level.

C: urls.py

Feedback: Incorrect. urls.py is also created within an app, not at the project level.

D: forms.py

Feedback: Incorrect. forms.py is not a core file created when starting a new Django project.

Question 12 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

Which of the following commands is used to start a new Django project?

A: django-admin startapp

Feedback: Incorrect. The 'startapp' command is used to create a new app within a Django project.

B: django-admin runserver

Feedback: Incorrect. The 'runserver' command is used to start the development server.

*C: django-admin startproject

Feedback: Correct! The 'startproject' command initializes a new Django project.

D: django-admin migrate

Feedback: Incorrect. The 'migrate' command is used to apply database migrations.


Question 13 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

Which template language does Django use by default to render dynamic HTML pages?

A: Jinja2

Feedback: Jinja2 is a popular template language, but it's not the default for Django.

B: Mako

Feedback: Mako is another templating language, but Django uses a different default.

*C: Django Template Language (DTL)

Feedback: Correct! Django uses the Django Template Language (DTL) by default.

D: Chameleon

Feedback: Chameleon is not the default template language for Django.

Question 14 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

Which method in Django QuerySets would you use to retrieve related objects in a many-to-many
relationship efficiently?

*A: prefetch_related

Feedback: Correct! prefetch_related is used to retrieve related objects in a many-to-many relationship


efficiently.

B: select_related

Feedback: Incorrect. select_related is used for foreign key relationships, not many-to-many
relationships.

C: filter

Feedback: Incorrect. filter is used to filter QuerySets based on conditions.

D: order_by

Feedback: Incorrect. order_by is used to order the QuerySet based on specified fields.
Question 15 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

Which Django component is responsible for defining the structure of the database?

*A: Model

Feedback: Correct! The Model component in Django defines the structure of the database.

B: View

Feedback: Incorrect. The View component handles the logic related to processing requests and returning
responses.

C: Template

Feedback: Incorrect. The Template component is used to render dynamic HTML pages.

D: URLconf

Feedback: Incorrect. The URLconf component maps URL patterns to views.

Question 16 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

Which file in a Django project contains settings and configuration for the entire project?

A: urls.py

Feedback: urls.py contains URL declarations for the project, not settings and configuration.

B: models.py

Feedback: models.py defines the models for the application, not settings and configuration.

C: views.py

Feedback: views.py contains the logic for processing requests and returning responses, not settings and
configuration.

*D: settings.py

Feedback: Correct! settings.py contains settings and configuration for the entire Django project.
Question 17 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

Which method in Django views is used to handle GET requests?

*A: get

Feedback: Correct! The get method is used to handle GET requests in Django views.

B: post

Feedback: Incorrect. The post method is used to handle POST requests, not GET requests.

C: put

Feedback: Incorrect. The put method is used to handle PUT requests, not GET requests.

D: delete

Feedback: Not quite. The delete method is used to handle DELETE requests, not GET requests.

Question 18 - multiple choice, shuffle, medium

Question category: Module: Full-stack Django Development

Which component of the Model-View-Controller (MVC) design pattern is responsible for managing the
data of the application?

*A: Model

Feedback: Correct! The Model component is responsible for managing the data of the application.

B: View

Feedback: Incorrect. The View component is responsible for displaying the data to the user.

C: Controller

Feedback: Incorrect. The Controller component is responsible for handling user input and updating the
Model and View accordingly.

D: Template

Feedback: Incorrect. Template is not a component of the MVC design pattern.


Question 19 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: Full-stack Django Development

Which of the following are key components of the Django Model-View-Template (MVT) pattern?

*A: Model

Feedback: Correct! The Model defines the data structure.

*B: View

Feedback: Correct! The View processes the logic for the request and response.

C: Controller

Feedback: Incorrect. Django uses the View instead of the Controller as in traditional MVC.

*D: Template

Feedback: Correct! The Template renders the HTML content.

E: Router

Feedback: Incorrect. Django does not have a Router component in its MVT pattern.

Question 20 - checkbox, shuffle, partial credit, medium

Question category: Module: Full-stack Django Development

Which of the following methods can be used to optimize Django QuerySets?

*A: select_related

Feedback: Correct! select_related is used for optimizing database access in Django QuerySets.

*B: prefetch_related

Feedback: Correct! prefetch_related is another method used to optimize database access in Django
QuerySets.

C: filter

Feedback: Incorrect. filter is used to narrow down QuerySets but does not necessarily optimize
performance.
*D: order_by

Feedback: Correct! order_by can be used to sort QuerySets efficiently.

E: aggregate

Feedback: Incorrect. aggregate is used to perform calculations but is not specifically for optimization.

Question 21 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: Full-stack Django Development

Select the core files that are created when starting a new Django project.

*A: manage.py

Feedback: Correct! The manage.py file is created when starting a new Django project.

*B: settings.py

Feedback: Correct! The settings.py file is created when starting a new Django project.

C: models.py

Feedback: Incorrect. The models.py file is not created by default when starting a new Django project.

*D: urls.py

Feedback: Correct! The urls.py file is created when starting a new Django project.

E: admin.py

Feedback: Incorrect. The admin.py file is not created by default when starting a new Django project.

Question 22 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: Full-stack Django Development

Which of the following are valid HTTP methods that can be handled by Django views?

*A: GET

Feedback: Correct! GET is a valid HTTP method that can be handled by Django views.

*B: POST
Feedback: Correct! POST is a valid HTTP method that can be handled by Django views.

C: FETCH

Feedback: Incorrect. FETCH is not a valid HTTP method.

*D: PUT

Feedback: Correct! PUT is a valid HTTP method that can be handled by Django views.

E: SEND

Feedback: Incorrect. SEND is not a valid HTTP method.

Question 23 - checkbox, shuffle, partial credit, medium

Question category: Module: Full-stack Django Development

Select the methods that are used to retrieve related objects for a foreign key relationship in Django
efficiently.

*A: select_related

Feedback: Correct! select_related retrieves related objects for a foreign key relationship efficiently.

*B: prefetch_related

Feedback: Correct! prefetch_related retrieves related objects for a foreign key relationship efficiently.

C: order_by

Feedback: order_by is used to order QuerySets, not to retrieve related objects for a foreign key
relationship.

D: filter

Feedback: filter is used to filter QuerySets, not to retrieve related objects for a foreign key relationship.

E: annotate

Feedback: annotate is used to add annotations to each object in a QuerySet, not to retrieve related
objects for a foreign key relationship.

Question 24 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: Full-stack Django Development


Which of the following can be customized in a Django admin site?

*A: Model fields display

Feedback: Correct! The display of model fields can be customized in the Django admin site.

B: Admin interface theme

Feedback: Incorrect. The admin interface theme is not customizable out of the box.

*C: Search functionality

Feedback: Correct! The search functionality can be customized in the Django admin site.

*D: Filter options

Feedback: Correct! Filter options can be customized in the Django admin site.

E: Database engine

Feedback: Incorrect. The database engine is configured in the settings, not customized in the admin site.

Question 25 - checkbox, shuffle, partial credit, medium

Question category: Module: Full-stack Django Development

Select the core functions available in Django QuerySets for aggregating data.

*A: count()

Feedback: Correct! count() is used to count the number of objects in a QuerySet.

*B: max()

Feedback: Correct! max() is used to find the maximum value of a field in a QuerySet.

C: order_by()

Feedback: Incorrect. order_by() is used to order the results of a QuerySet, not for aggregation.

*D: sum()

Feedback: Correct! sum() is used to calculate the sum of a field in a QuerySet.

E: filter()
Feedback: Incorrect. filter() is used to filter the results of a QuerySet based on certain conditions, not for
aggregation.

Question 26 - numeric, easy difficulty

Question category: Module: Full-stack Django Development

What is the default port number for a Django development server?

*A: 8000.0

Feedback: Correct! The default port for the Django development server is 8000.

Default Feedback: Incorrect. Check the Django documentation on the default settings for the
development server.

Question 27 - numeric, easy difficulty

Question category: Module: Full-stack Django Development

How many core files are created when starting a new Django project?

*A: 4.0

Feedback: Correct! When starting a new Django project, four core files are created.

Default Feedback: Incorrect. Please review the files created when starting a new Django project and try
again.

Question 28 - numeric, easy difficulty

Question category: Module: Full-stack Django Development

How many default fields are there in a newly created Django model class?

*A: 0.0

Feedback: Correct! By default, a new Django model class does not have any fields.

Default Feedback: Incorrect. Review the default structure of a new Django model class.

Question 29 - text match, easy difficulty

Question category: Module: Full-stack Django Development


In the context of Django, what is the term used to describe a function that receives a web request and
returns a web response? Please answer in all lowercase.

*A: view

Feedback: Correct! In Django, a function that handles web requests and responses is called a view.

*B: views

Feedback: Correct! You are right, although the singular form 'view' is more common.

Default Feedback: Incorrect. In Django, this function is referred to as a view.

Question 30 - text match, easy difficulty

Question category: Module: Full-stack Django Development

In Django, what is the name of the directory where templates are typically stored? Please answer in all
lowercase.

*A: templates

Feedback: Correct! Templates are typically stored in a directory named 'templates'.

Default Feedback: Incorrect. Please review the structure of a Django project.

Question 31 - text match, easy difficulty

Question category: Module: Full-stack Django Development

What is the Django design pattern that separates data, business logic, and user interface called? Please
answer in all lowercase.

*A: mvc

Feedback: Correct! MVC stands for Model-View-Controller, the design pattern that separates data,
business logic, and user interface.

*B: modelviewcontroller

Feedback: Correct! MVC stands for Model-View-Controller, the design pattern that separates data,
business logic, and user interface.

*C: model-view-controller
Feedback: Correct! MVC stands for Model-View-Controller, the design pattern that separates data,
business logic, and user interface.

*D: modelview-controller

Feedback: Correct! MVC stands for Model-View-Controller, the design pattern that separates data,
business logic, and user interface.

Default Feedback: Incorrect. The correct term is MVC, which stands for Model-View-Controller.

Question 32 - text match, easy difficulty

Question category: Module: Full-stack Django Development

What Django method is used to retrieve related objects for a foreign key relationship efficiently? Please
answer in all lowercase.

*A: select_related

Feedback: Correct! The select_related method is used to retrieve related objects for a foreign key
relationship efficiently.

*B: selectrelated

Feedback: Correct! The select_related method is used to retrieve related objects for a foreign key
relationship efficiently.

Default Feedback: Incorrect. Review the Django methods for querying and selecting related objects.

Question 33 - text match, easy difficulty

Question category: Module: Full-stack Django Development

What Django method is used to filter QuerySets based on a given lookup expression, such as filtering
objects with a field value greater than a specific number? Please answer in all lowercase.

*A: filter

Feedback: Correct! filter() is used to filter QuerySets based on given lookup expressions.

*B: filter()

Feedback: Correct! filter() is used to filter QuerySets based on given lookup expressions.

Default Feedback: Incorrect. Please review the methods available in Django QuerySets for filtering data.
Question 34 - text match, easy difficulty

Question category: Module: Full-stack Django Development

In Django, what method is used to execute raw SQL queries? Please answer in all lowercase. Please
answer in all lowercase.

*A: raw

Feedback: Correct! The raw method allows you to execute raw SQL queries in Django.

B: execute

Feedback: execute is a method used in database cursors, not directly in Django QuerySets.

C: query_raw

Feedback: query_raw is not a valid Django method. Try revisiting the lesson on executing raw SQL
queries.

D: sql

Feedback: sql is not a valid Django method. Try revisiting the lesson on executing raw SQL queries.

Default Feedback: Incorrect. Refer back to the lesson on executing raw SQL queries in Django.

Question 35 - text match, easy difficulty

Question category: Module: Full-stack Django Development

In Django, what is the name of the file where URL patterns are typically defined? Please answer in all
lowercase. Please answer in all lowercase.

*A: urls.py

Feedback: Correct! URL patterns in Django are typically defined in the urls.py file.

*B: urls

Feedback: Correct! URL patterns in Django are typically defined in the urls.py file.

Default Feedback: Incorrect. URL patterns in Django are typically defined in the urls.py file.

Question 36 - text match, easy difficulty

Question category: Module: Full-stack Django Development


What is the Django method used to order QuerySets by specified field(s)? Please answer in all
lowercase. Please answer in all lowercase.

*A: order_by

Feedback: Correct! order_by is used to order QuerySets by the specified field(s).

Default Feedback: Incorrect. Please review the Django QuerySet methods and try again.

Question 37 - text match, easy difficulty

Question category: Module: Full-stack Django Development

In Django, what is the name of the template tag used to include one template inside another? Please
answer in all lowercase. Please answer in all lowercase.

*A: include

Feedback: Correct! The 'include' template tag is used to include one template inside another.

Default Feedback: Incorrect. Please review the template tags in Django.

Question 38 - text match, easy difficulty

Question category: Module: Full-stack Django Development

In Django, what is the default template language used to render HTML? Please answer in all lowercase.
Please answer in all lowercase.

*A: django template language

Feedback: Correct! The default template language used by Django to render HTML is the Django
Template Language.

*B: dtl

Feedback: Correct! The default template language used by Django to render HTML is the Django
Template Language (DTL).

Default Feedback: Incorrect. Review the Django documentation on template languages and try again.

Question 39 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development


What is the primary purpose of a Django view in the context of the Model-View-Template (MVT)
pattern?

A: To handle the application's business logic and interact with the database

Feedback: Incorrect. Handling business logic and database interactions is the responsibility of the
Model.

*B: To receive HTTP requests and return HTTP responses

Feedback: Correct! The primary purpose of a Django view is to receive HTTP requests and return HTTP
responses.

C: To define the structure of the database

Feedback: Incorrect. Defining the database structure is the role of the Model.

D: To determine how data is presented to the user

Feedback: Incorrect. Determining how data is presented is the responsibility of the Template.

Question 40 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

In Django, which file is typically used to define URL patterns for a web application?

A: models.py

Feedback: Incorrect. The models.py file is used to define database models.

B: views.py

Feedback: Incorrect. The views.py file is used to define views.

*C: urls.py

Feedback: Correct! The urls.py file is typically used to define URL patterns for a web application in
Django.

D: templates.py

Feedback: Incorrect. There is no templates.py file in Django; templates are usually stored in a templates
directory.

Question 41 - multiple choice, shuffle, easy difficulty


Question category: Module: Full-stack Django Development

Which of the following describes the purpose of the models.py file in a Django project?

*A: Defines the database schema for the application

Feedback: Correct! The models.py file is used to define the database schema for your Django
application.

B: Configures the URL routing for the application

Feedback: Incorrect. The URL routing is configured in the urls.py file, not in models.py .

C: Contains the settings for the application

Feedback: Incorrect. The settings for the application are defined in the settings.py file.

D: Handles the HTTP requests and responses

Feedback: Incorrect. Handling HTTP requests and responses is the responsibility of the views in Django.

Question 42 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

Which of the following best describes the role of Django templates in the MVT pattern?

A: To define the structure of the data models.

Feedback: This is not correct. Data models are defined in the Django models, not templates.

B: To handle HTTP requests and return HTTP responses.

Feedback: This is not correct. Handling HTTP requests and responses is the role of Django views.

*C: To specify how data will be presented to the users.

Feedback: Correct! Django templates are used to define the presentation layer and specify how data is
displayed to the users.

D: To manage the database schema and migrations.

Feedback: This is not correct. Managing the database schema and migrations is handled by Django
models.

Question 43 - checkbox, shuffle, partial credit, easy difficulty


Question category: Module: Full-stack Django Development

Which of the following are true about Django views?

*A: They handle the logic for processing user requests.

Feedback: Correct! Django views handle the logic for processing user requests and generating HTTP
responses.

B: They define the structure of the database.

Feedback: This is incorrect. The structure of the database is defined by Django models, not views.

*C: They are responsible for rendering templates.

Feedback: Correct! Django views often render templates to generate the HTML that is sent to the user's
browser.

D: They define the URL patterns for the application.

Feedback: This is incorrect. URL patterns are defined in a separate URL configuration file, not in views.

Question 44 - multiple choice, shuffle, easy difficulty

Question category: Module: Full-stack Django Development

Which file in a Django project is primarily responsible for URL routing?

*A: urls.py

Feedback: Correct! The urls.py file is responsible for URL routing in a Django project.

B: views.py

Feedback: Incorrect. The views.py file is responsible for handling the logic of requests, not URL
routing.

C: models.py

Feedback: Incorrect. The models.py file is responsible for defining the data models, not URL routing.

D: settings.py

Feedback: Incorrect. The settings.py file is responsible for project-wide settings, not URL routing.

Question 45 - checkbox, shuffle, partial credit, easy difficulty


Question category: Module: Full-stack Django Development

Which of the following features can be customized in Django admin interface?

*A: Search functionality

Feedback: Correct. The search functionality can be customized in Django admin.

B: Database schema

Feedback: Incorrect. The database schema is not customized through the Django admin interface.

*C: UI widgets

Feedback: Correct. UI widgets can be customized in Django admin.

D: HTTP request handling

Feedback: Incorrect. HTTP request handling is managed by Django views, not the admin interface.

*E: Field management

Feedback: Correct. Fields can be managed and customized in the Django admin interface.

Question 46 - checkbox, shuffle, partial credit, medium

Question category: Module: Full-stack Django Development

Which of the following methods can be used to optimize database queries in Django?

*A: order_by

Feedback: Correct! The order_by method is used to specify the ordering of your QuerySet.

*B: select_related

Feedback: Correct! The select_related method creates a SQL join and includes the fields of the related
object in the SELECT statement.

*C: prefetch_related

Feedback: Correct! The prefetch_related method performs a separate lookup for each relationship and
does the joining in Python.

D: many_to_many
Feedback: Incorrect. many_to_many is a type of relationship, not a query optimization method.

*E: filter

Feedback: Correct! The filter method is used to filter the QuerySet based on the given parameters.

F: config

Feedback: Incorrect. config is not a method used for query optimization in Django.

Question 47 - text match, easy difficulty

Question category: Module: Full-stack Django Development

What is the design pattern used by Django that involves Models, Views, and Templates? Please answer
in all lowercase.

*A: mvt

Feedback: Correct! The design pattern used by Django is the Model-View-Template (MVT) pattern.

*B: modelviewtemplate

Feedback: Correct! The design pattern used by Django is the Model-View-Template (MVT) pattern.

Default Feedback: Incorrect. The design pattern used by Django involves Models, Views, and
Templates.

Question 48 - numeric, easy difficulty

Question category: Module: Full-stack Django Development

What is the default port number for a Django development server?

*A: 8000.0

Feedback: Correct! The default port number for a Django development server is 8000.

Default Feedback: Incorrect. Make sure to use the default port number for a Django development server.

Question 49 - numeric, easy difficulty

Question category: Module: Full-stack Django Development

If a QuerySet in Django has 150 records and you use the count method, what will be the result?
*A: 150.0

Feedback: Correct! The count method returns the exact number of records in the QuerySet.

Default Feedback: Incorrect. The count method returns the number of records in the QuerySet.

Question 50 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following is a characteristic of Object-Oriented Programming (OOP)?

*A: Encapsulation

Feedback: Correct! Encapsulation is one of the fundamental principles of OOP, which involves bundling
the data with the methods that operate on that data.

B: Schema Design

Feedback: Incorrect. Schema Design is related to database design, not an OOP principle.

C: Joins

Feedback: Incorrect. Joins are used in SQL to combine rows from multiple tables.

D: Indexing

Feedback: Incorrect. Indexing is a database optimization technique, not an OOP principle.

Question 51 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following is a key benefit of using Django's ORM?

*A: It simplifies database queries and abstracts SQL syntax.

Feedback: Correct! Django's ORM simplifies database queries and abstracts SQL syntax for developers.

B: It automatically scales the database based on user load.

Feedback: Incorrect. Django's ORM does not handle database scaling automatically.

C: It provides built-in data encryption for all fields.

Feedback: Incorrect. Django's ORM does not provide built-in data encryption for all fields.
D: It ensures zero-latency in database transactions.

Feedback: Incorrect. Django's ORM does not ensure zero-latency in database transactions.

Question 52 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following methods can be used to retrieve instances from a Django database?

*A: filter()

Feedback: Correct! The filter() method is used to retrieve instances that match given criteria.

*B: get()

Feedback: Correct! The get() method is used to retrieve a single instance that matches given criteria.

*C: all()

Feedback: Correct! The all() method retrieves all instances of the model from the database.

D: delete()

Feedback: Incorrect. The delete() method is used to delete instances, not retrieve them.

Question 53 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following statements best explains the concept of objects in object-oriented analysis and
design?

*A: Objects are instances of classes and encapsulate data and behavior.

Feedback: Correct! Objects are indeed instances of classes and they encapsulate both data and behavior.

B: Objects are blueprints for creating classes and only encapsulate data.

Feedback: Incorrect. Objects are instances of classes, not blueprints for creating them, and they
encapsulate both data and behavior.

C: Objects are used to perform database queries in Django.

Feedback: Incorrect. Objects are not specifically used for database queries in Django; Django models
handle database operations.
D: Objects are used to define the URL patterns in a Django application.

Feedback: Incorrect. Objects are not used to define URL patterns; URL patterns are defined using URL
configurations in Django.

Question 54 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following best describes the role of Object-Relational Mapping (ORM) in application
development?

*A: ORM allows developers to interact with a database using object-oriented programming languages.

Feedback: Correct! ORM indeed allows developers to use object-oriented programming languages to
interact with databases, simplifying database operations.

B: ORM is a database management system that uses object-oriented programming languages.

Feedback: Incorrect. ORM is not a database management system but acts as a bridge between OOP
languages and SQL databases.

C: ORM converts SQL queries into object-oriented programming languages.

Feedback: Incorrect. ORM maps objects to database tables, not SQL queries to programming languages.

D: ORM is used to create database schemas from object-oriented programming classes.

Feedback: Incorrect. While ORM can help generate schemas, its primary role is to map objects to
database tables.

Question 55 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following best describes the purpose of class diagrams in object-oriented analysis and
design?

*A: To illustrate the static structure of a system by representing its classes and relationships.

Feedback: Correct! Class diagrams represent the static structure of a system by showing its classes and
relationships, which helps in understanding the system's design.

B: To depict the dynamic behavior of a system by showing interaction among objects.

Feedback: Incorrect. Class diagrams focus on the static structure, not the dynamic behavior.
C: To model the user interface of a system by detailing screen layouts and navigation flows.

Feedback: Incorrect. Class diagrams are not used for modeling the user interface; they represent the
system's static structure.

D: To describe the sequence of actions performed by a system in response to external events.

Feedback: Incorrect. Class diagrams do not describe sequences of actions; they focus on the system's
static structure.

Question 56 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which feature of Django allows developers to define the structure of their database using Python code?

*A: Django ORM

Feedback: Correct! Django ORM allows developers to define database structure using Python code.

B: Django REST framework

Feedback: Incorrect. The Django REST framework is used for creating web APIs, not for defining
database structure.

C: Django Middleware

Feedback: Incorrect. Django Middleware is used for processing requests and responses, not for defining
database structure.

D: Django Templates

Feedback: Incorrect. Django Templates are used for rendering HTML, not for defining database
structure.

Question 57 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

In Django ORM, how can you represent a one-to-many relationship in a model?

*A: Using ForeignKey

Feedback: Correct! In Django ORM, a one-to-many relationship is represented using a ForeignKey field
in the model.
B: Using OneToOneField

Feedback: Incorrect. OneToOneField is used to represent a one-to-one relationship, not a one-to-many


relationship.

C: Using ManyToManyField

Feedback: Incorrect. ManyToManyField is used to represent a many-to-many relationship, not a one-to-


many relationship.

D: Using ManyToOneField

Feedback: Incorrect. Django ORM does not have a ManyToOneField; instead, a one-to-many
relationship is represented using a ForeignKey field.

Question 58 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What is the primary purpose of Django's migrate command?

*A: To apply and unapply migrations to the database

Feedback: Correct! The migrate command is used to apply and unapply migrations to the database,
ensuring the database schema is up-to-date.

B: To create new migrations based on changes to models

Feedback: Incorrect. The makemigrations command is used to create new migrations based on changes
to models.

C: To start the development server

Feedback: Incorrect. The runserver command is used to start the development server.

D: To install Django

Feedback: Incorrect. The install command is used to install Django, not migrate.

Question 59 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following best describes an advantage of using Django ORM over writing raw SQL
queries?
*A: It provides better security by preventing SQL injection attacks.

Feedback: Correct! Django ORM provides better security by preventing SQL injection attacks.

B: It allows for more complex queries than SQL.

Feedback: Not quite. SQL can also handle complex queries efficiently.

C: It automatically optimizes database performance.

Feedback: Incorrect. Performance optimization requires additional effort beyond using Django ORM.

D: It does not require any knowledge of database schemas.

Feedback: Wrong. Understanding database schemas is still important when using Django ORM.

Question 60 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following best describes the function of the Django model API save() method?

*A: It saves the current instance of the model to the database.

Feedback: Correct! The save() method saves the current instance of the model to the database.

B: It deletes the current instance of the model from the database.

Feedback: Incorrect. The save() method does not delete instances; it saves them to the database.

C: It updates the field values of the current model instance without saving.

Feedback: Incorrect. The save() method saves the instance, including any updated field values, to the
database.

D: It retrieves the current instance of the model from the database.

Feedback: Incorrect. The save() method does not retrieve instances; it saves the current instance to the
database.

Question 61 - checkbox, shuffle, partial credit, medium

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Select the correct statements about Object-Relational Mapping (ORM).


*A: ORM allows developers to interact with the database using Python code instead of SQL.

Feedback: Correct! ORM enables developers to use Python code to interact with the database.

B: ORM automatically optimizes all database queries for performance.

Feedback: Incorrect. ORM does not automatically optimize all database queries.

*C: ORM helps in maintaining the consistency of the database schema with the application models.

Feedback: Correct! ORM helps maintain consistency between the database schema and application
models.

D: ORM completely eliminates the need for writing any SQL queries.

Feedback: Incorrect. While ORM reduces the need for SQL queries, it does not eliminate them entirely.

Question 62 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following best describes the difference between SQL and Object-Oriented Programming
(OOP) paradigms?

*A: SQL is used for structuring data while OOP is used for structuring code.

Feedback: Correct! SQL is indeed used for structuring and managing data in relational databases,
whereas OOP is used for structuring and organizing code using objects and classes.

B: SQL is used for web development while OOP is solely used for database management.

Feedback: Incorrect. SQL is primarily used for querying and managing data in relational databases, and
OOP is used in general programming for a wide range of applications including web development.

C: SQL is a programming paradigm focused on data manipulation, whereas OOP is focused on machine
learning.

Feedback: Incorrect. SQL is focused on data manipulation, but OOP is a programming paradigm
focused on organizing code using objects and classes, not specifically on machine learning.

D: SQL is a method of defining functions, while OOP is a method of defining data structures.

Feedback: Incorrect. SQL is used for querying and managing data in databases, while OOP is a
programming paradigm for organizing code using objects and classes.

Question 63 - multiple choice, shuffle, easy difficulty


Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

In Django, which class is used to define a database model?

*A: Model

Feedback: Correct! The 'Model' class is used to define a database model in Django.

B: Field

Feedback: Incorrect. 'Field' is used within a model to define a column.

C: Form

Feedback: Wrong. 'Form' is used to handle user inputs in Django.

D: Template

Feedback: Not quite. 'Template' is used to define the HTML structure for rendering data in Django.

Question 64 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What is the purpose of Django's on_delete parameter in model fields?

*A: To define what happens to related objects when the referenced object is deleted.

Feedback: Correct! The on_delete parameter defines the behavior for related objects when a referenced
object is deleted.

B: To specify the database to use for a model.

Feedback: Incorrect. The on_delete parameter does not specify the database to use for a model.

C: To indicate the ordering of records in a query.

Feedback: Incorrect. The on_delete parameter does not influence the ordering of records in a query.

D: To set the default value for a field.

Feedback: Incorrect. The on_delete parameter is not used to set default values for fields.

Question 65 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model
Which method is used to delete an instance of a model in Django?

*A: delete()

Feedback: Correct! The delete() method is used to delete an instance of a model in Django.

B: remove()

Feedback: Incorrect. The remove() method is not used to delete an instance of a model in Django.

C: drop()

Feedback: Incorrect. The drop() method is not used to delete an instance of a model in Django.

D: destroy()

Feedback: Incorrect. The destroy() method is not used to delete an instance of a model in Django.

Question 66 - checkbox, shuffle, partial credit, medium

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following are true about Object-Relational Mapping (ORM)?

*A: ORM allows developers to interact with the database using object-oriented syntax.

Feedback: Correct! ORM enables developers to use object-oriented syntax to interact with the database.

*B: ORM eliminates the need for writing raw SQL queries.

Feedback: Correct! ORM reduces or eliminates the need for writing raw SQL queries by providing
methods for database operations.

C: ORM requires manual handling of database connections.

Feedback: Incorrect. ORM typically handles database connections automatically, reducing the need for
manual management.

D: ORM is used only in Django.

Feedback: Incorrect. ORM is not limited to Django; it is used in various frameworks and languages.

Question 67 - checkbox, shuffle, partial credit, medium

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model
Which of the following statements are true about Django query methods?

*A: filter() is used to retrieve data based on specific criteria.

Feedback: Correct! The filter() method allows you to filter the queryset based on certain conditions.

B: update() can be used to delete records from the database.

Feedback: Incorrect. The update() method is used for updating records, not deleting them.

*C: exclude() is used to exclude records that match certain criteria.

Feedback: Correct! The exclude() method excludes records that match the given criteria.

D: create() is used to update existing records in the database.

Feedback: Incorrect. The create() method is used for creating new records, not updating existing ones.

Question 68 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which query method is used in Django to update records in the database?

*A: update()

Feedback: Correct! The update() method in Django is used to update records in the database.

B: modify()

Feedback: Incorrect. There is no modify() method in Django for updating records. The correct method is
update().

C: save()

Feedback: Incorrect. The save() method is used to save an instance but not directly to update multiple
records. The correct method is update().

D: alter()

Feedback: Incorrect. There is no alter() method in Django for updating records. The correct method is
update().

Question 69 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model
What is the purpose of Django's makemigrations command?

*A: To create migration files based on the changes detected in models

Feedback: Correct! The makemigrations command creates migration files that reflect the changes made
to Django models.

B: To apply migration files to the database

Feedback: Incorrect. The migrate command is used to apply migration files to the database.

C: To roll back applied migrations

Feedback: Incorrect. The migrate command with specific options can be used to roll back migrations.

D: To create new Django models

Feedback: Incorrect. The makemigrations command is used to create migration files, not to create new
models.

Question 70 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following correctly describes the relationship between OOP and SQL?

*A: OOP focuses on objects and classes, while SQL focuses on tables and records.

Feedback: Correct! OOP deals with objects and classes, whereas SQL is used to manage and manipulate
data in tables.

B: OOP and SQL both primarily deal with data storage.

Feedback: Incorrect. While SQL is used for data storage, OOP is more about creating reusable objects
and defining their behaviors.

C: SQL is used for defining classes, and OOP is used for querying databases.

Feedback: Incorrect. SQL is used for querying databases and managing data, while OOP is used for
defining classes and creating objects.

D: OOP and SQL are both types of programming languages.

Feedback: Incorrect. OOP is a programming paradigm, while SQL is a language used for managing and
querying databases.
Question 71 - checkbox, shuffle, partial credit, medium

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Select the correct statements about Django models and database migrations.

*A: Django models define the structure of your database tables.

Feedback: Correct! Django models indeed define the structure of your database tables by mapping
models to database tables.

*B: Database migrations in Django are used to apply changes to your database schema.

Feedback: Correct! Database migrations apply the changes defined in your Django models to your
database schema.

C: Django models automatically synchronize with the database without migrations.

Feedback: Incorrect. Django models do not automatically synchronize with the database; migrations are
required to apply changes.

D: Migrations should be manually written for each change in Django models.

Feedback: Incorrect. Django can automatically create migration files when you make changes to your
models.

E: Django models can only be used with the SQLite database.

Feedback: Incorrect. Django models can be used with multiple database systems, not just SQLite.

Question 72 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following are key features of the Django web framework?

*A: Automatic admin interface

Feedback: Correct! Django provides an automatic admin interface that simplifies content management.

*B: Built-in template engine

Feedback: Correct! Django includes a built-in template engine that helps in rendering HTML.

C: Direct SQL query requirement for database operations


Feedback: Incorrect. One of Django's strengths is that it abstracts the database operations through its
ORM, so you don't need to write raw SQL queries.

*D: URL routing

Feedback: Correct! Django has a powerful URL routing system that maps URLs to views.

E: Exclusive support for MySQL

Feedback: Incorrect. Django supports multiple databases such as PostgreSQL, MySQL, SQLite, and
Oracle.

Question 73 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following are core concepts of Django ORM? Select all that apply.

*A: QuerySets

Feedback: Correct! QuerySets are a core concept in Django ORM, used to retrieve data from the
database.

B: Templates

Feedback: Incorrect. Templates are used for rendering HTML in Django, not a core concept of Django
ORM.

*C: Models

Feedback: Correct! Models are a core concept in Django ORM, used to define the structure of the
database.

D: Signals

Feedback: Incorrect. Signals are a way to allow decoupled applications to get notified when certain
actions occur, but they are not a core concept of Django ORM.

*E: Managers

Feedback: Correct! Managers are a core concept in Django ORM, used to interface with database query
operations.

Question 74 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model
Which of the following are relationships that can be modeled using Django ORM? Select all that apply.

*A: One-to-One

Feedback: Correct! One-to-One relationships can be modeled using Django ORM.

*B: Many-to-Many

Feedback: Correct! Many-to-Many relationships can be modeled using Django ORM.

C: One-to-None

Feedback: Incorrect. One-to-None is not a valid relationship type in Django ORM.

*D: Many-to-One

Feedback: Correct! Many-to-One relationships can be modeled using Django ORM.

E: Some-to-Many

Feedback: Incorrect. Some-to-Many is not a valid relationship type in Django ORM.

Question 75 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Select the query methods that can be used to retrieve instances from a Django database.

*A: filter()

Feedback: Correct! The filter() method is used to retrieve instances that match certain criteria.

*B: exclude()

Feedback: Correct! The exclude() method is used to exclude instances that match certain criteria.

*C: get()

Feedback: Correct! The get() method is used to retrieve a single instance that matches certain criteria.

D: remove()

Feedback: Incorrect. The remove() method is not used in Django for retrieving instances.

E: fetch()
Feedback: Incorrect. The fetch() method is not a valid Django query method for retrieving instances.
Consider revisiting the course material on Django query methods.

Question 76 - numeric, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What is the typical range for the length of a character field in Django models?

*A: 255.0

Feedback: Correct! The typical length for a character field ( CharField ) in Django models is up to 255
characters.

Default Feedback: Incorrect. The length for a character field in Django models is typically up to a
specific number of characters.

Question 77 - numeric, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What is the default port number used by the Django development server?

*A: 8000.0

Feedback: Correct! The default port number used by the Django development server is 8000.

Default Feedback: Incorrect. Review the default settings for the Django development server to find the
correct port number.

Question 78 - numeric, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What is the minimum number of tables required to represent a Many-to-Many relationship in Django
ORM?

*A: 3.0

Feedback: Correct! In Django ORM, a Many-to-Many relationship is typically represented with three
tables: two for the related models and one for the intermediary table.

Default Feedback: Incorrect. Review how Many-to-Many relationships are modeled in Django ORM.

Question 79 - numeric, easy difficulty


Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

How many primary key fields can a Django model have?

*A: 1.0

Feedback: Correct! A Django model can have only one primary key field.

Default Feedback: Incorrect. A Django model can only have one primary key field.

Question 80 - numeric, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What is the default port number for a Django development server?

*A: 8000.0

Feedback: Correct! The default port number for running a Django development server is 8000.

Default Feedback: Incorrect. Remember to check the default configuration settings for the Django
development server.

Question 81 - numeric, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

How many types of relationships can be modeled using Django ORM?

*A: 3.0

Feedback: Correct! Django ORM can model three types of relationships: One-To-One, Many-To-One,
and Many-To-Many.

Default Feedback: Incorrect. There are three types of relationships that can be modeled using Django
ORM.

Question 82 - numeric, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What is the default port number used by the PostgreSQL database?

*A: 5432.0

Feedback: Correct! The default port number used by PostgreSQL is 5432.


Default Feedback: Incorrect. Please review the lesson on PostgreSQL configuration.

Question 83 - text match, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What command is used to create a new Django app? Please answer in all lowercase.

*A: startapp

Feedback: Correct! The startapp command is used to create a new Django app.

*B: django-admin startapp

Feedback: Correct! The django-admin startapp command can also be used to create a new Django app.

Default Feedback: Incorrect. To create a new Django app, you would use the startapp command.

Question 84 - text match, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What type of diagram is used to visualize system structure and behavior in object-oriented design?
Please answer in all lowercase.

*A: uml

Feedback: Correct! UML diagrams are used to visualize system structure and behavior in object-
oriented design.

B: class

Feedback: Incorrect. While class diagrams are a type of UML diagram, the broader category is UML.

C: sequence

Feedback: Incorrect. Sequence diagrams are another type of UML diagram, but the broader category is
UML.

Default Feedback: Incorrect. The correct answer is UML, which stands for Unified Modeling Language.

Question 85 - text match, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model
What is the term used to describe the deletion of related objects in Django when the parent object is
deleted? Please answer in all lowercase. Please answer in all lowercase.

*A: cascade

Feedback: Correct! 'Cascade' is the term used to describe this operation.

Default Feedback: Incorrect. Please review the Django documentation on deleting related objects.

Question 86 - text match, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What is the term used to describe the process of converting an object into a format that can be stored in a
database table? Please answer in all lowercase.

*A: serialization

Feedback: Correct! The process of converting an object into a format that can be stored in a database
table is called serialization.

Default Feedback: Incorrect. The process is called serialization.

Question 87 - text match, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What is the term used to describe the process of defining the structure of a database and the relationships
between its tables? Please answer in all lowercase.

*A: schema

Feedback: Correct! Schema refers to the structure of a database and the relationships between its tables.

*B: database schema

Feedback: Correct! Database schema refers to the structure of a database and the relationships between
its tables.

Default Feedback: Incorrect. Please review the lesson on database structure and relationships.

Question 88 - text match, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What is the command to create a new Django project? Please answer in all lowercase.
*A: django-admin startproject

Feedback: Correct! The django-admin startproject command is used to create a new Django project.

Default Feedback: Incorrect. The command to create a new Django project is not correct. Please try
again.

Question 89 - text match, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What is the primary key that is automatically added to each Django model if not specified otherwise?
Please answer in all lowercase.

*A: id

Feedback: Correct! The primary key 'id' is automatically added to each Django model if not specified.

B: pk

Feedback: Incorrect. 'pk' is often used as a shorthand for primary key, but the default primary key is 'id'.

Default Feedback: Incorrect. The primary key automatically added to each Django model if not
specified is 'id'.

Question 90 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following best describes the nature of the Django web framework?

*A: A high-level Python web framework that encourages rapid development and clean, pragmatic
design

Feedback: Correct! Django is known for encouraging rapid development and a clean, pragmatic design.

B: A low-level framework for developing desktop applications

Feedback: Incorrect. Django is not used for desktop applications; it's a high-level web framework.

C: A JavaScript library for building user interfaces

Feedback: No. Django is a web framework, not a JavaScript library.

D: An IDE for Python development


Feedback: Not quite. Django is a web framework, not an Integrated Development Environment (IDE).

Question 91 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What is the primary purpose of class diagrams in software development?

*A: To visualize the static structure of a system

Feedback: Correct! Class diagrams are used to visualize the static structure of a system, showing the
system's classes, their attributes, and the relationships between the classes.

B: To depict the dynamic behavior of a system

Feedback: Not quite. Dynamic behavior is typically depicted using sequence diagrams or activity
diagrams, not class diagrams.

C: To represent the physical deployment of software components

Feedback: Incorrect. The physical deployment of software components is represented using deployment
diagrams.

D: To illustrate the flow of data within a system

Feedback: No, that's not correct. The flow of data within a system is generally illustrated using data flow
diagrams, not class diagrams.

Question 92 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What is the primary purpose of performing database migrations in Django?

*A: To create, alter, or delete database schema based on Django models.

Feedback: Correct! Database migrations in Django are used to create, alter, or delete the database
schema based on the models defined in the Django code.

B: To optimize the performance of SQL queries.

Feedback: Incorrect. While performance optimization is important, database migrations are primarily
used to manage schema changes.

C: To backup the database data.


Feedback: Incorrect. Database migrations are not used for data backups; they are used to manage
changes to the database schema.

D: To reset the database to its initial state.

Feedback: Incorrect. Resetting the database is not the primary purpose of migrations. Migrations are for
managing schema changes.

Question 93 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following best explains the role of Object Relational Mapping (ORM) in bridging the gap
between OOP and SQL?

*A: ORM allows developers to interact with the database using object-oriented syntax instead of SQL
queries.

Feedback: Correct! ORM enables developers to use object-oriented principles to interact with the
database, removing the need to write SQL queries directly.

B: ORM directly converts SQL queries into object-oriented code.

Feedback: Incorrect. ORM does not convert SQL queries into object-oriented code; it allows developers
to use objects to interact with the database.

C: ORM eliminates the need for any database schema.

Feedback: Incorrect. ORM does not eliminate the need for a database schema; it helps manage data
within the schema using object-oriented principles.

D: ORM is only used for reading data from the database.

Feedback: Incorrect. ORM is used for creating, reading, updating, and deleting data in the database
using object-oriented syntax.

Question 94 - multiple choice, shuffle, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

When converting an entity-relationship (ER) diagram to Django models, which of the following
represents an entity in the ER diagram?

*A: A Django model


Feedback: Correct! In Django ORM, an entity from an ER diagram typically translates to a Django
model.

B: A Django field

Feedback: Incorrect. A Django field represents an attribute of an entity, not the entity itself.

C: A Django view

Feedback: Incorrect. A Django view is used to handle web requests and does not represent an entity
from an ER diagram.

D: A Django template

Feedback: Incorrect. A Django template is used to render HTML content and does not represent an
entity from an ER diagram.

Question 95 - multiple choice, shuffle, medium

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following statements accurately describes the relationship between Object-Oriented
Programming (OOP) and Structured Query Language (SQL) when utilizing an ORM (Object Relational
Mapping) tool?

*A: ORMs map OOP objects to SQL tables, allowing developers to interact with the database using
their preferred programming language.

Feedback: Correct! ORMs bridge the gap between OOP and SQL by mapping objects to database tables.

B: ORMs transform SQL queries into OOP methods that developers can use directly in their code.

Feedback: Not quite. ORMs map OOP objects to SQL tables rather than transforming SQL queries into
OOP methods.

C: Using an ORM eliminates the need for a database schema in an OOP application.

Feedback: Incorrect. ORMs still require a database schema to map objects to tables.

D: ORMs are used to convert OOP code into machine code for optimized database interaction.

Feedback: Incorrect. ORMs facilitate interaction between OOP and SQL, not conversion to machine
code.

Question 96 - checkbox, shuffle, partial credit, easy difficulty


Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

Which of the following are common relationships that can be modeled using Django ORM?

*A: One-To-One

Feedback: Correct! One-To-One relationships in Django ORM are modeled using the OneToOneField.

*B: Many-To-One

Feedback: Correct! Many-To-One relationships in Django ORM are modeled using the ForeignKey.

C: One-To-Many

Feedback: Incorrect. Django ORM does not have a direct One-To-Many relationship; it is typically
modeled using Many-To-One with ForeignKey.

*D: Many-To-Many

Feedback: Correct! Many-To-Many relationships in Django ORM are modeled using the
ManyToManyField.

E: None-To-Many

Feedback: Incorrect. There is no such relationship type as None-To-Many in Django ORM.

Question 97 - text match, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What is the term used to describe the programming paradigm that focuses on using objects and classes?
Please answer in all lowercase.

*A: oop

Feedback: Correct! Object-Oriented Programming (OOP) is the programming paradigm that focuses on
using objects and classes.

*B: objectorientedprogramming

Feedback: Correct! Object-Oriented Programming (OOP) is the programming paradigm that focuses on
using objects and classes.

Default Feedback: Incorrect. Please refer to the course material on programming paradigms and review
the concept of programming that focuses on using objects and classes.
Question 98 - text match, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

What type of relationship is defined by a ForeignKey in Django? Please answer in all lowercase.

*A: many-to-one

Feedback: Correct! A ForeignKey in Django defines a many-to-one relationship.

*B: manytoone

Feedback: Correct! A ForeignKey in Django defines a many-to-one relationship.

Default Feedback: Recall the primary types of relationships in databases and which one is represented
by a ForeignKey in Django.

Question 99 - numeric, easy difficulty

Question category: Module: ORM: Bridging the Gap Between the Real World and Relational Model

How many core concepts are there in Django ORM?

*A: 3.0

Feedback: Correct! The core concepts of Django ORM are models, QuerySets, and migrations.

Default Feedback: Consider the fundamental elements that make up the Django ORM system, including
models, QuerySets, and migrations.

Question 100 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which of the following is a key advantage of using Django's generic class-based views?

*A: Reusability of code

Feedback: Correct! Generic class-based views help in reusing code efficiently.

B: Simpler URL patterns

Feedback: Incorrect. URL patterns are not necessarily simpler with generic class-based views.

C: Faster initial setup


Feedback: Incorrect. While they offer many benefits, faster initial setup is not one of the primary
advantages.

D: Better performance

Feedback: Incorrect. Generic class-based views do not inherently offer better performance.

Question 101 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which Django view class would you use to create a view that displays a list of objects?

A: DetailView

Feedback: DetailView is used to display a single object, not a list of objects.

B: CreateView

Feedback: CreateView is used to create new objects, not to display a list of objects.

*C: ListView

Feedback: Correct! ListView is used to display a list of objects in Django.

D: UpdateView

Feedback: UpdateView is used to update existing objects, not to display a list of objects.

Question 102 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which Django feature is responsible for managing static files?

*A: Staticfiles app

Feedback: Correct! The Staticfiles app in Django is responsible for managing static files.

B: Admin app

Feedback: Incorrect. The Admin app is used for creating admin interfaces.

C: Auth app

Feedback: Incorrect. The Auth app is used for authentication and authorization.
D: Sessions app

Feedback: Incorrect. The Sessions app is used for managing user sessions.

Question 103 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which of the following is the primary purpose of using Django's static files management system?

*A: To serve CSS, JavaScript, and image files

Feedback: Correct! Django's static files management system is used to serve CSS, JavaScript, and image
files.

B: To manage database migrations

Feedback: Incorrect. Managing database migrations is not the primary purpose of Django's static files
management system.

C: To handle HTTP requests and responses

Feedback: Incorrect. Handling HTTP requests and responses is done by Django views, not static files
management.

D: To authenticate users

Feedback: Incorrect. User authentication is not related to Django's static files management system.

Question 104 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

What is the primary purpose of Django's CreateView?

*A: To display a form for creating a new object and save it to the database

Feedback: Correct! CreateView is used to display a form for creating a new object and save it to the
database.

B: To delete an existing object from the database

Feedback: Incorrect. CreateView is not used for deleting objects. That would be DeleteView.

C: To update an existing object in the database


Feedback: Incorrect. CreateView is not used for updating objects. That would be UpdateView.

D: To display a list of objects from the database

Feedback: Incorrect. CreateView is not used for displaying lists of objects. That would be ListView.

Question 105 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

In Django, which of the following concepts is responsible for determining what a user is allowed to do
within the application?

A: Authentication

Feedback: Authentication verifies the identity of the user, but it does not determine what they can do
within the application.

*B: Authorization

Feedback: Correct! Authorization determines what actions a user is allowed to perform within the
application.

C: Bootstrap

Feedback: Bootstrap is a front-end framework and is not responsible for user permissions in Django.

D: Deployment

Feedback: Deployment is the process of publishing your application. It does not determine user
permissions.

Question 106 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which Bootstrap component can be used in Django templates to create a card layout for displaying
content?

*A: Card

Feedback: Correct! The Card component in Bootstrap is used to create a card layout for displaying
content.

B: Navbar
Feedback: Incorrect. The Navbar component is used for creating navigation bars.

C: Table

Feedback: Incorrect. The Table component is used for creating tables.

D: Form

Feedback: Incorrect. The Form component is used for creating forms.

Question 107 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which of the following best describes how to integrate the Bootstrap framework into Django templates?

*A: Include Bootstrap CDN link in the Django base template

Feedback: Correct! Including the Bootstrap CDN link in your base template allows you to use Bootstrap
components across all your Django templates.

B: Install Bootstrap as a Python package

Feedback: Incorrect. Bootstrap is a front-end framework and is not installed as a Python package. You
should link to its CDN or download its files to use in your project.

C: Use Django's built-in Bootstrap classes

Feedback: Incorrect. Django does not come with built-in Bootstrap classes. You need to explicitly
include Bootstrap in your project.

D: Integrate Bootstrap via Django middleware

Feedback: Incorrect. Bootstrap is not integrated via Django middleware. It should be included in your
HTML templates, typically through a CDN link or by downloading the Bootstrap files.

Question 108 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which HTTP methods are supported by Django class-based views for handling form submissions?

*A: GET and POST

Feedback: Correct! Django class-based views support GET and POST methods for handling form
submissions.
B: POST and DELETE

Feedback: Incorrect. Django class-based views do not support DELETE methods for form submissions.

C: PUT and PATCH

Feedback: Incorrect. PUT and PATCH methods are not typically used for form submissions in Django
class-based views.

D: GET and DELETE

Feedback: Incorrect. DELETE is not used for form submissions in Django class-based views.

Question 109 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which Django class-based view would you use to create a view that displays a single object in detail?

*A: DetailView

Feedback: Correct! DetailView is used to display a single object in detail.

B: ListView

Feedback: Incorrect. ListView is used to display a list of objects.

C: TemplateView

Feedback: Incorrect. TemplateView is used to render a template.

D: CreateView

Feedback: Incorrect. CreateView is used to handle object creation forms.

Question 110 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which of the following best describes the concept of authentication in Django?

*A: A process that verifies the identity of a user

Feedback: Correct! Authentication is the process of verifying the identity of a user.

B: A process that grants permissions to a user


Feedback: Incorrect. This describes authorization, not authentication.

C: A framework for creating user interfaces

Feedback: Incorrect. This describes a UI framework, not authentication.

D: A method for deploying Django applications

Feedback: Incorrect. This describes deployment, not authentication.

Question 111 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which of the following is the correct configuration for adding a new app named 'blog' to your Django
project?

*A: Add 'blog' to the INSTALLED_APPS list in settings.py

Feedback: Correct! Adding 'blog' to the INSTALLED_APPS list in settings.py is the correct
configuration.

B: Add 'blog' to the MIDDLEWARE list in settings.py

Feedback: Incorrect. The MIDDLEWARE list is for middleware components, not apps.

C: Add 'blog' to the TEMPLATES list in settings.py

Feedback: Incorrect. The TEMPLATES list is for template configurations, not apps.

D: Add 'blog' to the DATABASES list in settings.py

Feedback: Incorrect. The DATABASES list is for database configurations, not apps.

Question 112 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

How does Django manage static files such as CSS and media files?

*A: Using the staticfiles app

Feedback: Correct! Django uses the staticfiles app to manage static files like CSS and media files.

B: By embedding them directly into HTML templates


Feedback: Incorrect. Embedding static files directly into HTML templates is not a good practice for
manageability.

C: Through the templates app

Feedback: Incorrect. The templates app is used for managing template files, not static files.

D: Using a third-party package

Feedback: Incorrect. While third-party packages can be used, Django has built-in support for managing
static files using the staticfiles app.

Question 113 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which of the following settings files is used to configure deployment settings for a Django application?

*A: production.py

Feedback: Correct! production.py is used for deployment settings.

B: development.py

Feedback: Incorrect. development.py is not typically used for deployment settings.

C: settings.py

Feedback: Incorrect. settings.py is the main settings file but not specifically for deployment.

D: local.py

Feedback: Incorrect. local.py is not used for deployment settings.

Question 114 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which of the following are valid authentication backends in Django?

*A: ModelBackend

Feedback: Correct! ModelBackend is the default authentication backend in Django.

*B: RemoteUserBackend
Feedback: Correct! RemoteUserBackend is used for remote user authentication in Django.

C: JWTBackend

Feedback: Incorrect. JWTBackend is not a built-in authentication backend in Django.

D: OAuth2Backend

Feedback: Incorrect. OAuth2Backend is not a built-in authentication backend in Django.

Question 115 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which of the following statements best describes Django's ListView?

*A: It is used to display a list of objects from the database.

Feedback: Correct! ListView is used to display a list of objects from the database.

B: It is used to display the details of a single object.

Feedback: Incorrect. ListView is not used for displaying the details of a single object. That would be
DetailView.

C: It is used to handle user authentication.

Feedback: Incorrect. ListView is not used for handling user authentication.

D: It is used to update an existing object in the database.

Feedback: Incorrect. ListView is not used for updating objects. That would be UpdateView .

Question 116 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which of the following is a benefit of using class-based views over function-based views in Django?

*A: Enhanced code reusability

Feedback: Correct! Class-based views promote code reusability by allowing the use of inheritance and
mixins.

B: Simpler syntax for beginners


Feedback: Not quite. While class-based views offer many benefits, their syntax can be more complex for
beginners compared to function-based views.

C: Better performance for high traffic websites

Feedback: Incorrect. The performance of class-based views and function-based views is generally
comparable.

D: Easier to understand for small projects

Feedback: This is not correct. Class-based views can add complexity that may not be necessary for small
projects.

Question 117 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which of the following is a core concept of authentication in Django?

A: Determining what a user can do within the application

Feedback: This describes authorization, not authentication.

*B: Verifying the identity of a user

Feedback: Correct! Authentication is about verifying the identity of a user.

C: Managing static files and templates

Feedback: This is not related to authentication but to the configuration of static files and templates.

D: Handling database migrations

Feedback: This is related to database management, not authentication.

Question 118 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which of the following are class-based views in Django?

*A: DetailView

Feedback: Correct! DetailView is a class-based view used to display a single object.

B: FunctionView
Feedback: FunctionView is not a class-based view in Django.

*C: CreateView

Feedback: Correct! CreateView is a class-based view used to create new objects.

*D: ListView

Feedback: Correct! ListView is a class-based view used to display a list of objects.

E: RenderView

Feedback: RenderView is not a class-based view in Django.

Question 119 - checkbox, shuffle, partial credit, medium

Question category: Module: Consolidate and Deploy Your Django App

Which of the following are best practices for making Django apps production-ready for the cloud?

*A: Use environment variables for configuration

Feedback: Correct! Using environment variables helps keep configuration secure and easily changeable
without modifying the code.

B: Hardcode database credentials in settings.py

Feedback: Incorrect. Hardcoding database credentials is a security risk and should be avoided.

C: Enable DEBUG mode

Feedback: Incorrect. DEBUG mode should be disabled in production to prevent exposing sensitive
information.

*D: Use a WSGI server

Feedback: Correct! Using a WSGI server like Gunicorn or uWSGI is recommended for serving Django
applications in production.

E: Store static files on the local filesystem

Feedback: Incorrect. In production, it is better to use dedicated storage solutions like AWS S3 for static
files.

Question 120 - checkbox, shuffle, partial credit


Question category: Module: Consolidate and Deploy Your Django App

Which of the following are necessary steps to deploy a Django app on a web server?

*A: Set DEBUG to False

Feedback: Correct! Setting DEBUG to False is necessary for deploying a Django app on a web server.

B: Install the Django Debug Toolbar

Feedback: Incorrect. The Django Debug Toolbar is useful for development, not for deployment.

*C: Configure the ALLOWED_HOSTS setting

Feedback: Correct! Configuring the ALLOWED_HOSTS setting is necessary for deploying a Django
app on a web server.

D: Use SQLite as the database engine

Feedback: Incorrect. SQLite is not recommended for production deployment.

*E: Collect static files

Feedback: Correct! Collecting static files is necessary for deploying a Django app on a web server.

F: Run the development server using manage.py runserver

Feedback: Incorrect. The development server should not be used for production deployment.

Question 121 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which of the following are static files managed by Django?

*A: CSS files

Feedback: Correct! CSS files are static files that Django manages.

B: HTML templates

Feedback: Incorrect. HTML templates are not considered static files.

*C: JavaScript files

Feedback: Correct! JavaScript files are static files that Django manages.
*D: Images

Feedback: Correct! Images are static files that Django manages.

E: Python scripts

Feedback: Incorrect. Python scripts are not static files.

Question 122 - checkbox, shuffle, partial credit, medium

Question category: Module: Consolidate and Deploy Your Django App

Select all the views in Django that can be used to handle form submissions and save data to the database.

*A: CreateView

Feedback: Correct! CreateView handles form submissions and saves data for new objects.

B: DetailView

Feedback: Incorrect. DetailView is used to display details of a single object.

*C: UpdateView

Feedback: Correct! UpdateView handles form submissions and saves data for updating existing objects.

D: DeleteView

Feedback: Incorrect. DeleteView is used to delete objects, not to handle form submissions and save data.

E: ListView

Feedback: Incorrect. ListView is used to display a list of objects, not to handle form submissions and
save data.

Question 123 - numeric, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

How many installed apps must be configured in the Django settings file to use the built-in authentication
system?

*A: 1.0

Feedback: Correct! You need to configure one installed app: 'django.contrib.auth'.


Default Feedback: Incorrect. Django requires a specific number of installed apps to use its built-in
authentication system.

Question 124 - numeric, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

What is the default port number for the Django development server?

*A: 8000.0

Feedback: Correct! The default port number for the Django development server is 8000.

Default Feedback: Incorrect. Review the Django documentation for the correct default port number.

Question 125 - numeric, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

What is the typical port number used by the Django development server?

*A: 8000.0

Feedback: Correct! The Django development server typically runs on port 8000.

Default Feedback: Incorrect. Review the Django development server documentation to find the default
port number.

Question 126 - numeric, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

What is the default port number for Django development server?

*A: 8000.0

Feedback: Correct! The default port number for Django's development server is 8000.

Default Feedback: Check Django's official documentation on default port numbers and development
server settings.

Question 127 - text match, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App


What is the name given to the Django feature that allows for the reuse of HTML code snippets across
different pages? Please answer in all lowercase.

*A: templates

Feedback: Correct! Templates in Django allow for the reuse of HTML code snippets.

*B: template

Feedback: Correct! Template in Django allows for the reuse of HTML code snippets.

Default Feedback: Incorrect. Templates in Django are used to reuse HTML code snippets across
different pages.

Question 128 - text match, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Name the Bootstrap class used to create a responsive container. Please answer in all lowercase.

*A: container-fluid

Feedback: Correct! The container-fluid class is used to create a responsive container in Bootstrap.

*B: container_fluid

Feedback: Correct! The container_fluid class is also accepted as it is a common typo.

Default Feedback: Incorrect. Review the Bootstrap documentation on responsive containers.

Question 129 - text match, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

What is the term used to describe the process of verifying a user's identity in Django? Please answer in
all lowercase. Please answer in all lowercase.

*A: authentication

Feedback: Correct! Authentication is the process of verifying a user's identity.

Default Feedback: Incorrect. Please review the concept of verifying a user's identity in Django.

Question 130 - text match, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App


What is the term used for a Django view that is specifically designed to handle the editing of an existing
object? Please answer in all lowercase. Please answer in all lowercase.

*A: updateview

Feedback: Correct! UpdateView is designed to handle the editing of an existing object.

B: editview

Feedback: Incorrect. While it sounds plausible, the correct term is UpdateView.

C: modifyview

Feedback: Incorrect. The correct term is UpdateView.

Default Feedback: Incorrect. The correct term is UpdateView.

Question 131 - text match, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

What is the term used for the Django view that displays a detailed page for a single object? Please
answer in all lowercase. Please answer in all lowercase.

*A: detailview

Feedback: Correct! DetailView is used to display a detailed page for a single object.

*B: detail view

Feedback: Correct! Detail View is used to display a detailed page for a single object.

Default Feedback: Incorrect. Please review the Django documentation on DetailView.

Question 132 - text match, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

What is the name of the Django feature that allows you to manage reusable application components?
Please answer in all lowercase. Please answer in all lowercase.

*A: apps

Feedback: Correct! Django apps allow you to manage reusable application components.

*B: applications
Feedback: Correct! Applications is another term for Django apps.

Default Feedback: Incorrect. Please review the Django documentation on reusable application
components.

Question 133 - text match, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

What is the term used for the HTML and Django Template Language combined file used to render
dynamic content? Please answer in all lowercase. Please answer in all lowercase.

*A: template

Feedback: Correct! This combined file is called a template in Django.

*B: templates

Feedback: Correct! This combined file is called a template in Django.

Default Feedback: Incorrect. The combined file used to render dynamic content is called a template in
Django.

Question 134 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

What is the main difference between function-based views (FBVs) and class-based views (CBVs) in
Django?

A: FBVs are more flexible while CBVs are more rigid

Feedback: Incorrect. Flexibility is not the main difference between FBVs and CBVs.

*B: FBVs use functions to define views while CBVs use classes to define views

Feedback: Correct! FBVs use functions to define views while CBVs use classes to define views.

C: CBVs are used for static content while FBVs are used for dynamic content

Feedback: Incorrect. Both FBVs and CBVs can handle dynamic content.

D: CBVs can only interact with databases while FBVs cannot

Feedback: Incorrect. Both FBVs and CBVs can interact with databases.
Question 135 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

What is the purpose of the ListView class in Django?

*A: To render a list of objects

Feedback: Correct! The ListView class is used to display a list of objects.

B: To create a new object

Feedback: Incorrect. The CreateView class is used to create new objects.

C: To update an existing object

Feedback: Incorrect. The UpdateView class is used to update existing objects.

D: To delete an existing object

Feedback: Incorrect. The DeleteView class is used to delete existing objects.

Question 136 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which of the following best describes the role of Django views?

A: To define the structure of the database

Feedback: This describes the role of Django models, not views.

*B: To handle user input and return appropriate responses

Feedback: Correct! Django views handle user input and return appropriate responses.

C: To manage the settings and configurations of a Django project

Feedback: This describes the role of Django settings, not views.

D: To provide a means for URL routing

Feedback: This describes the role of Django URLs, not views.

Question 137 - multiple choice, shuffle, easy difficulty


Question category: Module: Consolidate and Deploy Your Django App

Which Bootstrap component is commonly used to create a responsive navigation menu in Django
templates?

A: Container

Feedback: Incorrect. The Container component is used for layout, not for navigation menus.

B: Card

Feedback: Incorrect. The Card component is used for displaying content in a card format.

*C: NavBar

Feedback: Correct! The NavBar component is used to create responsive navigation menus.

D: Table

Feedback: Incorrect. The Table component is used for displaying tabular data.

Question 138 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

In Django, which of the following is used to handle static files?

*A: django.contrib.staticfiles

Feedback: Correct! The 'django.contrib.staticfiles' module is used to manage static files in Django.

B: django.core.handlers.static

Feedback: Incorrect. 'django.core.handlers.static' is not used to handle static files in Django. Review the
usage of static files in Django.

C: django.db.static

Feedback: Incorrect. 'django.db.static' is not related to handling static files in Django. Try checking the
Django documentation on static files.

D: django.forms.static

Feedback: Incorrect. 'django.forms.static' is not the correct module for handling static files in Django.
Make sure to study the static file management in Django.
Question 139 - multiple choice, shuffle, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which of the following is NOT a common Bootstrap template component used in Django templates?

*A: Carousel

Feedback: Correct! Carousel is not a common Bootstrap template component used in Django templates.

B: Navigation bar

Feedback: Incorrect. Navigation bar is indeed a common Bootstrap template component used in Django
templates.

C: Card deck

Feedback: Incorrect. Card deck is a common Bootstrap template component used in Django templates.

D: Container

Feedback: Incorrect. Container is a common Bootstrap template component used in Django templates.

Question 140 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

Which of the following are Django class-based views?

*A: DetailView

Feedback: Correct! DetailView is indeed a Django class-based view.

*B: ListView

Feedback: Correct! ListView is indeed a Django class-based view.

*C: TemplateView

Feedback: Correct! TemplateView is indeed a Django class-based view.

D: AuthView

Feedback: Incorrect. AuthView is not a Django class-based view.

E: ModelView
Feedback: Incorrect. ModelView is not a standard Django class-based view.

Question 141 - text match, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

What is the term used for the Django feature that handles user authentication and authorization? Please
answer in all lowercase.

*A: auth

Feedback: Correct! The Django auth module handles user authentication and authorization.

B: authentication

Feedback: Incorrect. Review the specific terminology used in Django.

C: authorization

Feedback: Incorrect. Review the specific terminology used in Django.

D: userauth

Feedback: Incorrect. Review the specific terminology used in Django.

Default Feedback: Incorrect. Please review the Django documentation on authentication and
authorization.

Question 142 - numeric, easy difficulty

Question category: Module: Consolidate and Deploy Your Django App

What is the default port number for Django's development server?

*A: 8000.0

Feedback: Correct! The default port number for Django's development server is 8000.

Default Feedback: Incorrect. Review the Django documentation for information on the default settings.

Question 143 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

In Django, which of the following is used to define the structure of your database tables?
*A: Models

Feedback: Correct! In Django, models are used to define the structure of your database tables.

B: Views

Feedback: Incorrect. Views are used to handle the logic of your web application.

C: Templates

Feedback: Incorrect. Templates are used to define the HTML structure of your web pages.

D: Forms

Feedback: Incorrect. Forms are used to handle user input and validation.

Question 144 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which SQL statement is used to add a new row to a table?

*A: INSERT INTO

Feedback: Correct! The INSERT INTO statement is used to add a new row to a table.

B: UPDATE

Feedback: Incorrect. The UPDATE statement is used to modify existing rows in a table.

C: SELECT

Feedback: Incorrect. The SELECT statement is used to retrieve data from a table.

D: DELETE

Feedback: Incorrect. The DELETE statement is used to remove rows from a table.

Question 145 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which of the following commands is used to create a new Django project?

*A: django-admin startproject


Feedback: Correct! The django-admin startproject command is used to create a new Django project.

B: django-admin startapp

Feedback: Incorrect. The django-admin startapp command is used to create a new application within a
Django project.

C: django-admin newproject

Feedback: Incorrect. There is no django-admin newproject command in Django.

D: django-admin createproject

Feedback: Incorrect. The correct command is django-admin startproject to create a new project.

Question 146 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which of the following best describes the purpose of SQL in managing data within relational databases?

*A: SQL is used to define, manipulate, and query data.

Feedback: Correct! SQL is a powerful language for defining, manipulating, and querying data within
relational databases.

B: SQL is used to design the user interface of a database.

Feedback: Incorrect. SQL is concerned with managing data, not designing user interfaces.

C: SQL is a programming language for creating web applications.

Feedback: Incorrect. SQL is not a programming language for web development; it is specifically for
managing data in databases.

D: SQL is used to monitor network security.

Feedback: Incorrect. SQL does not deal with network security; it is used for managing data in relational
databases.

Question 147 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

What is the purpose of the COUNT function in SQL?


*A: To count the number of rows that match a specified condition

Feedback: Correct! The COUNT function returns the number of rows that match a specified condition.

B: To sum the values in a numeric column

Feedback: Incorrect. The SUM function is used to calculate the total of a numeric column.

C: To find the maximum value in a column

Feedback: Incorrect. The MAX function is used to find the highest value in a column.

D: To find the average value of a numeric column

Feedback: Incorrect. The AVG function is used to calculate the average value of a numeric column.

Question 148 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

What is a key advantage of using a Relational Database Management System (RDBMS)?

A: Data redundancy

Feedback: Data redundancy can be minimized using RDBMS, but it is not the primary advantage.

*B: Data independence

Feedback: Correct! Data independence is a significant advantage of using an RDBMS.

C: Complex data types

Feedback: While RDBMS can handle complex data, it is not a primary advantage over other systems.

D: Simplified data models

Feedback: RDBMS uses structured data models, which are not necessarily simplified.

Question 149 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which SQL command is used to remove a table from a database?

*A: DROP TABLE


Feedback: Correct! The DROP TABLE command is used to remove a table from a database.

B: DELETE TABLE

Feedback: Incorrect. The DELETE command is used to delete records, not tables. Revisit the section on
SQL commands.

C: REMOVE TABLE

Feedback: Incorrect. REMOVE TABLE is not a valid SQL command. Check the SQL basics.

D: ERASE TABLE

Feedback: Incorrect. ERASE TABLE is not a valid SQL command. Study the SQL syntax for table
operations.

Question 150 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which SQL command is used to remove all rows from a table, without removing the table itself?

A: DROP

Feedback: The DROP command removes the table structure and all its data.

*B: TRUNCATE

Feedback: Correct! The TRUNCATE command removes all rows from a table without removing the
table structure.

C: DELETE

Feedback: The DELETE command removes rows from a table based on a condition, but it does not
remove all rows without a condition.

D: REMOVE

Feedback: There is no REMOVE command in SQL.

Question 151 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which of the following is a valid way to define a URL pattern in Django?


*A: Using the path function in urls.py

Feedback: Correct! The path function is used to define URL patterns in Django.

B: Using the url function in views.py

Feedback: Incorrect. The url function is not used in views.py. Revisit the section on URL dispatching in
Django.

C: Using the route function in models.py

Feedback: Incorrect. The route function is not used in models.py. Review the URL configuration
methods in Django.

D: Using the redirect function in admin.py

Feedback: Incorrect. The redirect function is not related to defining URL patterns. Check the Django
URL routing documentation.

Question 152 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which SQL statement is used to retrieve data from a relational database table?

*A: SELECT

Feedback: Correct! The SELECT statement is used to retrieve data from a relational database table.

B: INSERT

Feedback: Incorrect. The INSERT statement is used to add new rows to a table.

C: UPDATE

Feedback: Incorrect. The UPDATE statement is used to modify existing data in a table.

D: DELETE

Feedback: Incorrect. The DELETE statement is used to remove rows from a table.

Question 153 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which concept maps entities and attributes to a relational database table?


*A: Entity-Relationship model

Feedback: Correct! The Entity-Relationship model is used to map entities and attributes to a relational
database table.

B: Hierarchical model

Feedback: The Hierarchical model is an older database model and does not map entities and attributes to
a relational database table.

C: Network model

Feedback: The Network model is not used to map entities and attributes to a relational database table.

D: Object-oriented model

Feedback: The Object-oriented model is used in object-oriented databases, not relational databases.

Question 154 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which Django feature allows you to define database schema using Python code instead of SQL?

*A: Django ORM

Feedback: Correct! Django ORM allows you to define database schema using Python code.

B: Django REST framework

Feedback: Incorrect. The Django REST framework is used for building web APIs.

C: Django Admin

Feedback: Incorrect. Django Admin is used for managing the web application through a web interface.

D: Django Views

Feedback: Incorrect. Django Views handle the logic for rendering responses to requests.

Question 155 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which SQL statement is used to remove all data from a table but keep its structure intact?
A: DROP TABLE

Feedback: DROP TABLE removes the table structure and data, which is not what is asked.

*B: TRUNCATE TABLE

Feedback: Correct! TRUNCATE TABLE removes all data but keeps the table structure intact.

C: DELETE FROM

Feedback: DELETE FROM can remove data but leaves the structure and can be used with a WHERE
clause, which is not the best option here.

D: ALTER TABLE

Feedback: ALTER TABLE is used to modify the table structure, not to remove data.

Question 156 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which SQL statement is used to delete a table from a database?

*A: DROP TABLE

Feedback: Correct! The DROP TABLE statement is used to delete a table from a database.

B: DELETE TABLE

Feedback: Incorrect. DELETE TABLE is not a valid SQL statement.

C: REMOVE TABLE

Feedback: Incorrect. REMOVE TABLE is not a valid SQL statement.

D: TRUNCATE TABLE

Feedback: Incorrect. TRUNCATE TABLE removes all rows from a table, but does not delete the table
itself.

Question 157 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which type of JOIN returns all rows from the right table and the matched rows from the left table?
*A: RIGHT JOIN

Feedback: Correct! A RIGHT JOIN returns all rows from the right table and the matched rows from the
left table.

B: LEFT JOIN

Feedback: Incorrect. A LEFT JOIN returns all rows from the left table and the matched rows from the
right table.

C: INNER JOIN

Feedback: Incorrect. An INNER JOIN returns only the rows that have matching values in both tables.

D: FULL JOIN

Feedback: Incorrect. A FULL JOIN returns all rows when there is a match in either left or right table.

Question 158 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which SQL command is used to create a new table in a database?

*A: CREATE

Feedback: Correct! The CREATE command is used to create a new table in a database.

B: ALTER

Feedback: Incorrect. The ALTER command is used to modify an existing table.

C: TRUNCATE

Feedback: Incorrect. The TRUNCATE command is used to remove all rows from a table.

D: DROP

Feedback: Incorrect. The DROP command is used to delete a table from the database.

Question 159 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which SQL clause is used to sort the result set in either ascending or descending order?
*A: ORDER BY

Feedback: Correct! The ORDER BY clause is used to sort the result set in either ascending or
descending order.

B: SORT BY

Feedback: Incorrect. SORT BY is not a valid SQL clause.

C: GROUP BY

Feedback: Incorrect. The GROUP BY clause is used to group rows that have the same values into
summary rows.

D: ARRANGE BY

Feedback: Incorrect. ARRANGE BY is not a valid SQL clause.

Question 160 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which of the following SQL clauses can be used to filter the results of a SELECT statement?

*A: WHERE

Feedback: Correct! The WHERE clause is used to filter records that meet a certain condition.

*B: HAVING

Feedback: Correct! The HAVING clause is used to filter records after an aggregation has been
performed.

C: ORDER BY

Feedback: Incorrect. The ORDER BY clause is used to sort the result set.

D: GROUP BY

Feedback: Incorrect. The GROUP BY clause is used to group rows that have the same values in
specified columns.

E: FROM

Feedback: Incorrect. The FROM clause is used to specify the table from which to retrieve or delete data.
Question 161 - checkbox, shuffle, partial credit, medium

Question category: Module: Getting Started with SQL & Relational Databases

Select all the operations that can be performed using the ALTER command in SQL.

*A: Add a new column to a table

Feedback: Correct! You can add a new column to a table using the ALTER command.

B: Delete all rows from a table

Feedback: Incorrect. To delete all rows from a table, you would use the TRUNCATE command.

*C: Change the data type of a column

Feedback: Correct! You can change the data type of a column using the ALTER command.

*D: Rename a table

Feedback: Correct! You can rename a table using the ALTER command.

E: Delete a table from the database

Feedback: Incorrect. To delete a table from the database, you would use the DROP command.

Question 162 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which of the following statements correctly describe NoSQL databases?

*A: They are designed for distributed data stores.

Feedback: Correct! NoSQL databases are often designed for distributed data stores.

B: They use SQL as their primary query language.

Feedback: NoSQL databases do not primarily use SQL; they use various other query languages.

*C: They are suitable for handling large volumes of unstructured data.

Feedback: Correct! NoSQL databases are suitable for handling large volumes of unstructured data.

D: They ensure ACID properties for transactions.


Feedback: NoSQL databases typically relax one or more of the ACID properties to achieve performance
and scalability.

E: They use a fixed schema.

Feedback: NoSQL databases are known for their schema-less design, which allows for flexibility in data
storage.

Question 163 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which of the following SQL statements can be used to modify the structure of an existing table?

*A: ALTER TABLE

Feedback: Correct! The ALTER TABLE statement is used to modify the structure of an existing table.

B: UPDATE TABLE

Feedback: Incorrect. The UPDATE TABLE statement is used to modify the data within a table, not its
structure.

*C: DROP TABLE

Feedback: Correct! The DROP TABLE statement is used to delete a table from the database.

D: CREATE TABLE

Feedback: Incorrect. The CREATE TABLE statement is used to create a new table, not modify an
existing one.

E: TRUNCATE TABLE

Feedback: Incorrect. The TRUNCATE TABLE statement is used to remove all rows from a table, but
does not modify its structure.

Question 164 - checkbox, shuffle, partial credit, medium

Question category: Module: Getting Started with SQL & Relational Databases

Identify the characteristics that differentiate relational and non-relational databases.

*A: Relational databases use SQL for querying data.

Feedback: Correct! SQL is a common language used for querying data in relational databases.
*B: Non-relational databases are typically schema-less.

Feedback: Correct! Non-relational databases often don't require a fixed schema.

C: Relational databases are ideal for hierarchical data storage.

Feedback: Incorrect. Relational databases are not typically used for hierarchical data storage.

D: Non-relational databases cannot handle large volumes of unstructured data.

Feedback: Incorrect. Non-relational databases are actually well-suited for handling large volumes of
unstructured data.

*E: Relational databases are based on a tabular structure.

Feedback: Correct! Relational databases use tables to store data.

Question 165 - checkbox, shuffle, partial credit

Question category: Module: Getting Started with SQL & Relational Databases

Which of the following SQL clauses can be used with the SELECT statement?

*A: WHERE

Feedback: Correct! The WHERE clause can be used to filter records.

*B: GROUP BY

Feedback: Correct! The GROUP BY clause groups rows that have the same values into summary rows.

*C: ORDER BY

Feedback: Correct! The ORDER BY clause is used to sort the result set.

*D: HAVING

Feedback: Correct! The HAVING clause is used to filter records after the GROUP BY clause.

E: SET

Feedback: Incorrect. The SET clause is used with the UPDATE statement.

F: INTO

Feedback: Incorrect. The INTO clause is used with the INSERT statement.
Question 166 - checkbox, shuffle, partial credit

Question category: Module: Getting Started with SQL & Relational Databases

Which of the following are join operators in SQL?

*A: INNER JOIN

Feedback: Correct! INNER JOIN is one of the most common join operators.

*B: OUTER JOIN

Feedback: Correct! OUTER JOIN includes LEFT, RIGHT, and FULL OUTER JOINs.

C: EQUI JOIN

Feedback: Incorrect. EQUI JOIN is a type of INNER JOIN based on equality.

*D: CROSS JOIN

Feedback: Correct! CROSS JOIN returns the Cartesian product of the sets of rows from the joined
tables.

*E: SELF JOIN

Feedback: Correct! SELF JOIN is a regular join but the table joins with itself.

F: CONCAT JOIN

Feedback: Incorrect. There is no CONCAT JOIN in SQL.

Question 167 - numeric, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

How many rows will be affected by the following SQL statement if there are 10 rows in the table that
match the condition?\[ \text{DELETE FROM employees WHERE department = 'Sales'} \]

*A: 10.0

Feedback: Correct! The DELETE statement will affect all rows that match the condition.

Default Feedback: Incorrect. Revisit the lesson on the DELETE statement and try again.

Question 168 - numeric, easy difficulty


Question category: Module: Getting Started with SQL & Relational Databases

How many types of JOINs are commonly used in SQL?

*A: 7.0

Feedback: Correct! There are seven common types of JOINs in SQL: INNER JOIN, OUTER JOIN,
LEFT JOIN, RIGHT JOIN, FULL JOIN, CROSS JOIN, and SELF JOIN.

Default Feedback: Incorrect. Please review the different types of JOINs in SQL.

Question 169 - numeric, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Approximately how many types of NoSQL databases are commonly recognized?

*A: 4.0

Feedback: Correct! There are commonly four types of NoSQL databases: key-value, document, column-
family, and graph databases.

Default Feedback: Incorrect. Recall the common types of NoSQL databases discussed in the lecture.

Question 170 - numeric, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

How many fundamental SQL database operations are covered in this lesson?

*A: 4.0

Feedback: Correct! The lesson covers four fundamental SQL database operations: CREATE, ALTER,
TRUNCATE, and DROP.

Default Feedback: Incorrect. Revisit the lesson to count the number of fundamental SQL database
operations covered.

Question 171 - numeric, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

How many common types of SQL join operators are there?

*A: 4.0
Feedback: Correct! There are four common types of SQL join operators: INNER JOIN, LEFT JOIN,
RIGHT JOIN, and FULL OUTER JOIN.

Default Feedback: The common types of SQL join operators include INNER JOIN, LEFT JOIN,
RIGHT JOIN, and FULL OUTER JOIN.

Question 172 - numeric, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

What is the default port number for the Django development server?

*A: 8000.0

Feedback: Correct! The default port number for the Django development server is 8000.

Default Feedback: Incorrect. Review the default port number for the Django development server in the
Django documentation.

Question 173 - numeric, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

How many types of join operators are commonly used in SQL?

*A: 4.0

Feedback: Correct! There are commonly four types of join operators in SQL: INNER JOIN, LEFT
JOIN, RIGHT JOIN, and FULL OUTER JOIN.

Default Feedback: Incorrect. Please review the lesson on types of join operators.

Question 174 - numeric, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

How many records are returned by the SQL query if no records match the WHERE clause criteria?

*A: 0.0

Feedback: Correct! When no records match the criteria, the query returns zero records.

Default Feedback: Incorrect. Consider what happens when no records meet the WHERE clause criteria.

Question 175 - numeric, easy difficulty


Question category: Module: Getting Started with SQL & Relational Databases

How many primary types of NoSQL databases are commonly recognized?

*A: 4.0

Feedback: Correct! There are four primary types of NoSQL databases: document, key-value, column-
family, and graph.

Default Feedback: Incorrect. Review the different primary types of NoSQL databases.

Question 176 - text match, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Identify the keyword used in SQL to retrieve only unique values. Please answer in all lowercase.

*A: distinct

Feedback: Correct! The DISTINCT keyword is used to retrieve unique values.

Default Feedback: Incorrect. Please review the use of DISTINCT in SQL to retrieve unique values.

Question 177 - text match, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

In Django, what command is used to start a new app? Please answer in all lowercase.

*A: startapp

Feedback: Correct! The startapp command is used to create a new app in Django.

*B: django-admin startapp

Feedback: Correct! The django-admin startapp command is used to create a new app in Django.

Default Feedback: Incorrect. Refer to the Django documentation on starting a new app.

Question 178 - text match, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which SQL clause is used to remove duplicate values from a result set? Please answer in all lowercase.

*A: distinct
Feedback: Correct! The DISTINCT clause is used to remove duplicate values from a result set.

Default Feedback: Incorrect. Revisit the lesson on SQL clauses and try again.

Question 179 - text match, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

What type of JOIN returns only the rows that have matching values in both tables? Please answer in all
lowercase.

*A: inner

Feedback: Correct! An INNER JOIN returns only the rows that have matching values in both tables.

*B: innerjoin

Feedback: Correct! An INNER JOIN returns only the rows that have matching values in both tables.

Default Feedback: Incorrect. Review the different types of JOINs to find which one returns only the
rows with matching values in both tables.

Question 180 - text match, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

What is the term used to describe the linking of tables in a relational database? Please answer in all
lowercase.

*A: join

Feedback: Correct! In relational databases, tables are linked using joins.

*B: joins

Feedback: Correct! In relational databases, tables are linked using joins.

Default Feedback: Incorrect. The correct term is 'join' or 'joins'.

Question 181 - text match, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

What is the command to apply migrations in Django? Please answer in all lowercase.

*A: migrate
Feedback: Correct! The migrate command is used to apply migrations in Django.

Default Feedback: Incorrect. Review the command used to apply migrations in Django.

Question 182 - text match, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

What is the primary language used to manage data in relational databases? Please answer in all
lowercase.

*A: sql

Feedback: Correct! SQL is the primary language used for managing data in relational databases.

Default Feedback: Incorrect. Remember that relational databases primarily use a specific language for
data management.

Question 183 - text match, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which SQL command is used to modify the structure of an existing table? Please answer in all
lowercase.

*A: alter

Feedback: Correct! The ALTER command is used to modify the structure of an existing table.

B: modify

Feedback: Close, but MODIFY is not a valid SQL command to change table structure.

C: change

Feedback: No, the CHANGE command does not exist in SQL for altering table structures. Please review
the SQL commands.

Default Feedback: Incorrect. Please review the SQL commands for modifying table structures.

Question 184 - text match, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

What type of key is used to uniquely identify each row in a table? Please answer in all lowercase.
*A: primary

Feedback: Correct! A primary key is used to uniquely identify each row in a table.

*B: primarykey

Feedback: Correct! A primary key is used to uniquely identify each row in a table.

Default Feedback: Incorrect. Please review the lesson on primary keys.

Question 185 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which SQL command is used to remove all records from a table without deleting the table itself?

A: DELETE

Feedback: DELETE removes records but can be rolled back, and does not remove the table.

*B: TRUNCATE

Feedback: Correct! TRUNCATE removes all records from a table quickly and cannot be rolled back.

C: DROP

Feedback: DROP removes the table and its structure from the database, which is not what is needed
here.

D: ALTER

Feedback: ALTER is used to modify the structure of a table, not to remove records.

Question 186 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which SQL statement is used to insert a new row into a table?

*A: INSERT INTO

Feedback: Correct! The INSERT INTO statement is used to add new rows to a table in SQL.

B: ADD INTO

Feedback: Incorrect. The correct statement is INSERT INTO, not ADD INTO.
C: INSERT NEW

Feedback: Incorrect. The statement INSERT NEW does not exist in SQL.

D: ADD NEW

Feedback: Incorrect. SQL does not support the statement ADD NEW.

Question 187 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which SQL statement is used to remove all rows from a table without removing the table structure?

*A: TRUNCATE

Feedback: Correct! The TRUNCATE statement is used to remove all rows from a table without
affecting the table structure.

B: DELETE

Feedback: Incorrect. The DELETE statement removes rows from a table, but it can be used with a
WHERE clause to specify which rows to remove, and it does not necessarily remove all rows.

C: DROP

Feedback: Incorrect. The DROP statement is used to remove the table structure along with its data.

D: REMOVE

Feedback: Incorrect. REMOVE is not a valid SQL statement.

Question 188 - multiple choice, shuffle, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

What is one of the primary advantages of using SQL in relational databases?

A: It allows for the creation of dynamic websites.

Feedback: While SQL can help in managing databases that support dynamic websites, this is not its
primary advantage.

*B: It provides a standardized way to query and manipulate data.


Feedback: Correct! SQL offers a standardized language for querying and manipulating data across
different relational database systems.

C: It enables real-time data streaming.

Feedback: Real-time data streaming is not a primary function of SQL.

D: It is primarily used for data visualization.

Feedback: SQL is used for querying and managing data, not for data visualization.

Question 189 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which of the following are key strategies for success in IBM Coursera?

*A: Regularly review and revise course materials

Feedback: Correct! Regular review and revision help reinforce learning.

B: Procrastinate on assignments

Feedback: Incorrect. Procrastination can lead to last-minute stress and lower-quality work.

*C: Actively participate in discussion forums

Feedback: Correct! Participation in discussion forums can enhance understanding through interaction
with peers.

D: Ignore feedback from instructors

Feedback: Incorrect. Feedback from instructors can provide valuable insights and areas for
improvement.

*E: Set specific learning goals

Feedback: Correct! Setting specific goals can help track progress and stay motivated.

Question 190 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which of the following SQL operations can be used to retrieve data from a relational database?

*A: SELECT
Feedback: Correct! The SELECT statement is used to retrieve data from a database.

B: UPDATE

Feedback: Incorrect. The UPDATE statement is used to modify existing data in a table.

C: DELETE

Feedback: Incorrect. The DELETE statement is used to remove rows from a table.

D: INSERT

Feedback: Incorrect. The INSERT statement is used to add new rows to a table.

*E: SELECT DISTINCT

Feedback: Correct! The SELECT DISTINCT statement retrieves unique records from a database.

*F: JOIN

Feedback: Correct! The JOIN operation is used to combine rows from two or more tables based on a
related column.

Question 191 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which of the following are types of SQL JOIN operations?

*A: INNER JOIN

Feedback: Correct! INNER JOIN returns records that have matching values in both tables.

*B: OUTER JOIN

Feedback: Correct! OUTER JOIN returns all records when there is a match in either left or right table
records.

*C: CROSS JOIN

Feedback: Correct! CROSS JOIN returns the Cartesian product of the two tables.

D: SIDE JOIN

Feedback: Incorrect. SIDE JOIN is not a valid SQL JOIN operation.


*E: FULL JOIN

Feedback: Correct! FULL JOIN returns all records when there is a match in either left or right table
records.

Question 192 - checkbox, shuffle, partial credit, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

Which of the following are benefits of using a Relational Database Management System (RDBMS)?

*A: Data integrity

Feedback: Correct! An RDBMS ensures data integrity through constraints and relationships.

*B: Scalability

Feedback: Correct! RDBMSs are known to be scalable to handle large amounts of data.

C: Schema flexibility

Feedback: Schema flexibility is typically a feature of NoSQL databases, not RDBMS.

*D: Support for complex transactions

Feedback: Correct! RDBMSs support complex transactions which ensure data consistency.

E: Unstructured data management

Feedback: RDBMSs are designed for structured data, not unstructured data management.

Question 193 - text match, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases

What is the primary language used for backend development in Django? Please answer in all lowercase.

*A: python

Feedback: Correct! Django uses Python for backend development.

Default Feedback: Incorrect. Please review the course materials on Django backend development.

Question 194 - text match, easy difficulty

Question category: Module: Getting Started with SQL & Relational Databases
What SQL clause is used to filter records in a SELECT statement? Please answer in all lowercase.

*A: where

Feedback: Correct! The WHERE clause is used to filter records based on specified conditions.

Default Feedback: Incorrect. Please review the SQL clauses used for filtering records.

You might also like