Franz Kafka
Franz Kafka

Reputation: 844

Does SQLite support schemas (i.e., in the Postgres sense of the word)?

This is a tough one to search for. I searched for SQLite schema (obviously not good), SQLite namespace, and SQLite named database, but came up empty. Basically, I have a bunch of different tables named info, and in Postgres each of the tables is in a separate schema (e.g., student.info, teacher.info, etc). I'm just wondering if SQLite has something similar to Postgres schemas.

Upvotes: 7

Views: 2596

Answers (1)

CL.
CL.

Reputation: 180280

SQLite uses schema names to to access objects in attached databases.

So in SQLite, you should use schema names only when you already have multiple database files for some reason. Using multiple databases to emulate PostgreSQL-style schemas might be possible, but is usually a bad idea. (And there are many other differences in their SQL dialects.)

Upvotes: 7

Related Questions