Examveda

How do you define a class that maps to a database table using SQLAlchemy?

A. By subclassing the Database class

B. By using the @database_table decorator

C. By inheriting from the Base class and defining attributes

D. By using the map_table() function

Answer: Option C

Solution (By Examveda Team)

In SQLAlchemy, you inherit from the Base class and define attributes to map a class to a database table.

Join The Discussion

Related Questions on Database Connectivity with Python

What is SQLite?

A. A type of programming language

B. A relational database management system

C. A Python module for web scraping

D. A version control system