Using SQLite

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/23

flashcard set

Earn XP

Description and Tags

These flashcards review the unique features of SQLite, its minimal data types, primary-key behavior, table management statements, join operations, and common use cases.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

24 Terms

1
New cards

What makes SQLite a "serverless" database?

It runs directly within the host application and does not require a separate database server process or installation.

2
New cards

Which programming language is SQLite written in?

C

3
New cards

Name two characteristics that make SQLite ideal for mobile and embedded systems.

Very small footprint/minimal overhead and self-contained (no external server needed).

4
New cards

Is SQLite fully ACID-compliant?

Yes, it supports Atomicity, Consistency, Isolation, and Durability to protect data integrity.

5
New cards

List the five core data types supported by SQLite.

INTEGER, REAL, TEXT, BLOB, and NULL.

6
New cards

How does SQLite handle inserting the string "9876" into an INTEGER column?

It automatically converts the numeric string to the integer 9876 and stores it.

7
New cards

What happens if you insert a non-numeric string like "abcd" into an INTEGER column in SQLite?

SQLite stores the literal string "abcd" instead of throwing an error.

8
New cards

How are Boolean values stored in SQLite?

As INTEGER values 0 (false) and 1 (true); there is no separate BOOLEAN type.

9
New cards

In what format does SQLite store dates by default?

As TEXT strings (or optionally as the number of seconds since 1970-01-01 00:00:00).

10
New cards

Write the SQL command to create a table with no declared data types in SQLite.

CREATE TABLE myTable (a, b, c);

11
New cards

What is the primary purpose of a PRIMARY KEY in SQLite?

To uniquely identify each record (row) in a table.

12
New cards

Are PRIMARY KEY columns automatically indexed in SQLite?

Yes, SQLite automatically creates an index on PRIMARY KEY columns to speed up lookups.

13
New cards

Can a PRIMARY KEY in SQLite contain NULL values?

Yes in general, but NOT if the primary-key column is declared as INTEGER; however using NULL defeats the purpose and is discouraged.

14
New cards

What is a composite key in SQLite?

A PRIMARY KEY that is defined using more than one column (e.g., PRIMARY KEY (col1, col2)).

15
New cards

Which SQL statement is used to add a new column to an existing SQLite table?

ALTER TABLE … ADD COLUMN …

16
New cards

Name four common table-level constraints available when creating a table in SQLite.

PRIMARY KEY, UNIQUE, NOT NULL, FOREIGN KEY.

17
New cards

What SQLite statement would you use to remove rows that meet a condition?

DELETE FROM table_name WHERE condition;

18
New cards

Which SQL clause in a SELECT query is commonly used to filter rows?

WHERE

19
New cards

Why should columns used in JOIN conditions often be indexed?

Indexing those columns can greatly improve JOIN performance by speeding up row matching.

20
New cards

Describe the result of an INNER JOIN in SQLite.

Returns only the rows that have matching values in both joined tables.

21
New cards

What distinguishes a LEFT JOIN from a RIGHT JOIN?

LEFT JOIN returns all rows from the left table and matching rows from the right; RIGHT JOIN does the reverse (all from right, matching from left).

22
New cards

What does a FULL OUTER JOIN return?

All rows from both tables, placing NULL in columns where no match exists.

23
New cards

Give two real-world applications that commonly embed SQLite.

Mobile apps (Android/iOS) and web browsers (e.g., Chrome, Firefox).

24
New cards

Why can SQLite’s lenient typing make porting to other databases difficult?

Other RDBMSs enforce stricter data types and length limits, so data that SQLite freely stores (e.g., oversized strings or mismatched types) may cause errors elsewhere.