Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python SQLite Database

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is SQLite?

a)

A relational database management system

b)

A graphical user interface

c)

A programming language

d)

A web development framework

2.

Which command is used to create a new database in SQLite?

a)

CREATE DATABASE

b)

CREATE TABLE

c)

CREATE SCHEMA

d)

CREATE DATABASE TABLE

3.

What is a primary key in a SQLite database?

a)

A unique identifier for each row in a table

b)

A foreign key in a related table

c)

A column that stores binary data

d)

A special type of index for sorting data

4.

Which of the following commands is used to insert data into a SQLite database?

a)

ADD

b)

UPDATE

c)

DELETE

d)

INSERT

5.

What is the syntax for creating a table in SQLite?

a)

CREATE TABLE table_name (first_col, second_col, third_col)

b)

CREATE table_name TABLE (first_col, second_col, third_col)

c)

CREATE table_name (first_col, second_col, third_col) TABLE

d)

CREATE (first_col, second_col, third_col) TABLE table_name

6.

Which command is used to retrieve data from a SQLite database?

a)

SELECT

b)

GET

c)

FETCH

d)

RECEIVE

7.

What is the purpose of the WHERE clause in a SQLite SELECT statement?

a)

To filter the results based on a condition

b)

To order the results by a specific column

c)

To group the results by a specific column

d)

To join tables together

8.

What is a SQLite index?

a)

A data structure that improves the speed of database queries

b)

A column that stores unique identifiers for each row

c)

A special type of table used for storing binary data

d)

A foreign key in a related table

9.

Which datatype is used to store date and time values in SQLite?

a)

INT

b)

CHAR

c)

TEXT

d)

DATETIME

10.

What is the difference between a DELETE and TRUNCATE command in SQLite?

a)

DELETE removes individual rows, while TRUNCATE removes all rows at once

b)

DELETE removes all rows, while TRUNCATE removes individual rows

c)

DELETE is a DDL command, while TRUNCATE is a DML command

d)

DELETE is a DML command, while TRUNCATE is a DDL command