WorksheetsPython SQLite Database
Total questions: 10
Worksheet time: 5mins
What is SQLite?
A relational database management system
A graphical user interface
A programming language
A web development framework
Which command is used to create a new database in SQLite?
CREATE DATABASE
CREATE TABLE
CREATE SCHEMA
CREATE DATABASE TABLE
What is a primary key in a SQLite database?
A unique identifier for each row in a table
A foreign key in a related table
A column that stores binary data
A special type of index for sorting data
Which of the following commands is used to insert data into a SQLite database?
ADD
UPDATE
DELETE
INSERT
What is the syntax for creating a table in SQLite?
CREATE TABLE table_name (first_col, second_col, third_col)
CREATE table_name TABLE (first_col, second_col, third_col)
CREATE table_name (first_col, second_col, third_col) TABLE
CREATE (first_col, second_col, third_col) TABLE table_name
Which command is used to retrieve data from a SQLite database?
SELECT
GET
FETCH
RECEIVE
What is the purpose of the WHERE clause in a SQLite SELECT statement?
To filter the results based on a condition
To order the results by a specific column
To group the results by a specific column
To join tables together
What is a SQLite index?
A data structure that improves the speed of database queries
A column that stores unique identifiers for each row
A special type of table used for storing binary data
A foreign key in a related table
Which datatype is used to store date and time values in SQLite?
INT
CHAR
TEXT
DATETIME
What is the difference between a DELETE and TRUNCATE command in SQLite?
DELETE removes individual rows, while TRUNCATE removes all rows at once
DELETE removes all rows, while TRUNCATE removes individual rows
DELETE is a DDL command, while TRUNCATE is a DML command
DELETE is a DML command, while TRUNCATE is a DDL command
