Prev Next

Database / SQLite Interview questions

What are the supported data types in SQLite?

SQLite uses a small set of storage classes rather than the rigid, fixed-width types found in most other database systems — each value stored is tagged with one of these classes based on the value itself, regardless of the column's declared type.

NULLINTEGERREALTEXTBLOB
Missing value.Signed integer, variable size.Floating-point number. Text string.Raw binary data, stored exactly as given.
CREATE TABLE example (
    id INTEGER,
    name TEXT,
    score REAL,
    data BLOB
);

This is fundamentally different from a fixed-type system: a column declared INTEGER can still technically store a text value in SQLite (subject to the column's type affinity), since the storage class is ultimately determined by the value, not strictly enforced by the declared column type the way it would be in most other SQL databases.

How many fundamental storage classes does SQLite use?
What determines a stored value's storage class in SQLite?

Invest now in Acorns!!! 🚀 Join Acorns and get your $5 bonus!
Acorns Logo

Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!

Earn passively and while sleeping

Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.

Robinhood Logo

Invest now!!! Get Free equity stock (US, UK only)!

Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.

The Robinhood app makes it easy to trade stocks, crypto and more.


Webull Logo

Webull! Receive free stock by signing up using the link: Webull signup.

More Related questions...

What is SQLite? What are the key features of SQLite? How is SQLite different from client-server databases like MySQL or PostgreSQL? What is the file format of a SQLite database? What are the supported data types in SQLite? What is dynamic typing (type affinity) in SQLite? How do you create a table in SQLite? How do you insert data into a SQLite table? How do you query data from a SQLite table? How do you update a record in SQLite? How do you delete a record in SQLite? What is a PRIMARY KEY in SQLite? What is AUTOINCREMENT in SQLite? What is a UNIQUE constraint in SQLite? What is a FOREIGN KEY in SQLite and how do you enable it? What is the sqlite3 command-line shell used for? How do you create an index in SQLite? What is a NULL value in SQLite? What is the difference between CHAR, VARCHAR, and TEXT in SQLite? What is the ROWID in a SQLite table? What is an in-memory SQLite database? How do you back up a SQLite database? What is the PRAGMA statement used for? What is a VIEW in SQLite? What is a TRIGGER in SQLite? What is the difference between DELETE, TRUNCATE, and DROP in SQLite? What is a transaction in SQLite and how do you use BEGIN/COMMIT/ROLLBACK? What is the difference between WAL mode and rollback journal mode? Why does SQLite recommend enabling foreign keys explicitly, given they're off by default? What is the difference between INTEGER PRIMARY KEY and a regular PRIMARY KEY in SQLite? How does SQLite handle concurrent writes? What is the difference between a SQLite VIEW and a TABLE? How do you perform a JOIN in SQLite? What is an UPSERT in SQLite (INSERT... ON CONFLICT)? How do you use the EXPLAIN QUERY PLAN statement? What is a composite primary key in SQLite? How does SQLite handle database locking? What is the difference between VACUUM and ANALYZE in SQLite? Explain the internal working of SQLite's B-tree storage structure? How does WAL mode improve concurrency compared to the default rollback journal? Explain the lifecycle of a SQLite transaction from BEGIN to COMMIT? Why might full-text search (FTS5) be needed instead of a LIKE query? How do you optimize a slow SQLite query? What are the limitations of SQLite for large-scale, high-concurrency applications? How does SQLite ensure ACID compliance without a separate server process? Explain how SQLite's write-ahead logging (WAL) checkpoint process works? What isolation level does SQLite provide, compared to other RDBMS? What is the STRICT keyword used for in SQLite table definitions?
Show more question and Answers...

Integration

Comments & Discussions