codejump

Models & CRUD Basics

Preview — 3 of 10 questions

In SQLModel, what does table=True mean for class Hero(SQLModel, table=True)?

AHero is mapped to a database table
BHero becomes an HTTP route
CEvery Hero is stored in browser memory
DThe class is only an OpenAPI schema

Why use a separate HeroCreate model without table=True for a POST body?

AIt creates a second physical table
BIt describes client input without making it a table
CIt automatically commits the request
DIt disables validation

What does Session(engine) provide to a FastAPI CRUD handler?

AA new FastAPI application
BA JSON response by itself
CA unit for reading and writing database rows
DA browser cookie

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.