Small. Fast. Reliable.
Choose any three.

SQLite Requirement Matrix Details
lang_attach.html

Index Summary Markup Original


R-35371-58843-38332-21753-13618-41551-34238-06657 tcl slt th3 src

The ATTACH DATABASE statement adds another database file to the current database connection.

th3/req1/attach01.test:18

/* IMP: R-35371-58843 */
# EVIDENCE-OF: R-35371-58843 The ATTACH DATABASE statement adds another
# database file to the current database connection.

R-02612-37947-62500-41847-13282-34946-09245-20088 tcl slt th3 src

The filename for the database to be attached is the value of the expression that occurs before the AS keyword.

th3/req1/attach01.test:21

/* IMP: R-02612-37947 */
# EVIDENCE-OF: R-02612-37947 The filename for the database to be
# attached is the value of the expression that occurs before the AS
# keyword.

R-57724-31954-10264-24402-01814-32974-35251-10420 tcl slt th3 src

The filename of the database follows the same semantics as the filename argument to sqlite3_open() and sqlite3_open_v2(); the special name ":memory:" results in an in-memory database and an empty string results in a new temporary database.

th3/req1/attach03.test:10

/* IMP: R-57724-31954 */
# EVIDENCE-OF: R-57724-31954 The filename of the database follows the
# same semantics as the filename argument to sqlite3_open() and
# sqlite3_open_v2(); the special name ":memory:" results in an in-memory
# database and an empty string results in a new temporary database.

R-00402-11496-45496-40393-08263-15231-62727-28991 tcl slt th3 src

The filename argument can be a URI filename if URI filename processing is enable on the database connection.

th3/cov1/sharedcache03.test:236

/* IMP: R-00402-11496 */
# EVIDENCE-OF: R-00402-11496 The filename argument can be a URI filename
# if URI filename processing is enable on the database connection.

R-40602-24566-60725-06279-09295-25327-26293-64572 tcl slt th3 src

The schema-names 'main' and 'temp' refer to the main database and the database used for temporary tables.

th3/req1/attach01.test:30

/* IMP: R-40602-24566 */
# EVIDENCE-OF: R-40602-24566 The schema-names 'main' and 'temp' refer to
# the main database and the database used for temporary tables.

R-43455-30330-13340-63618-42639-11266-34972-33026 tcl slt th3 src

The main and temp databases cannot be attached or detached.

th3/req1/attach01.test:38

/* IMP: R-43455-30330 */
# EVIDENCE-OF: R-43455-30330 The main and temp databases cannot be
# attached or detached.

R-04549-59621-55549-18042-51558-13572-61866-18080 tcl slt th3 src

Tables in an attached database can be referred to using the syntax schema-name.table-name.

th3/req1/attach01.test:105

/* IMP: R-04549-59621 */
# EVIDENCE-OF: R-04549-59621 Tables in an attached database can be
# referred to using the syntax schema-name.table-name.

R-38412-06710-13373-27041-27382-60302-02109-00077 tcl slt th3 src

If the name of the table is unique across all attached databases and the main and temp databases, then the schema-name prefix is not required.

th3/req1/attach01.test:168

/* IMP: R-38412-06710 */
# EVIDENCE-OF: R-38412-06710 If the name of the table is unique across
# all attached databases and the main and temp databases, then the
# schema-name prefix is not required.

R-55636-16561-36868-23956-09727-21947-00276-50271 tcl slt th3 src

If two or more tables in different databases have the same name and the schema-name prefix is not used on a table reference, then the table chosen is the one in the database that was least recently attached.

th3/req1/attach01.test:143

/* IMP: R-55636-16561 */
# EVIDENCE-OF: R-55636-16561 If two or more tables in different
# databases have the same name and the schema-name prefix is not used on
# a table reference, then the table chosen is the one in the database
# that was least recently attached.

R-10872-35808-62525-46404-48063-22154-06728-34056 tcl slt th3 src

Transactions involving multiple attached databases are atomic, assuming that the main database is not ":memory:" and the journal_mode is not WAL.

th3/req1/attach02.test:11   th3/stress/crash002.test:14   th3/stress/crash003.test:12

/* IMP: R-10872-35808 */
# EVIDENCE-OF: R-10872-35808 Transactions involving multiple attached
# databases are atomic, assuming that the main database is not
# ":memory:" and the journal_mode is not WAL.

R-34979-54336-33279-53576-25867-30233-28350-04331 tcl slt th3 src

If the main database is ":memory:" or if the journal_mode is WAL, then transactions continue to be atomic within each individual database file. But if the host computer crashes in the middle of a COMMIT where two or more database files are updated, some of those files might get the changes where others might not.

th3/req1/attach02.test:15

/* IMP: R-34979-54336 */
# EVIDENCE-OF: R-34979-54336 If the main database is ":memory:" or if
# the journal_mode is WAL, then transactions continue to be atomic
# within each individual database file. But if the host computer crashes
# in the middle of a COMMIT where two or more database files are
# updated, some of those files might get the changes where others might
# not.

R-06367-56981-61813-52742-22421-22635-19629-30966 tcl slt th3 src

There is a limit, set using sqlite3_limit() and SQLITE_LIMIT_ATTACHED, to the number of databases that can be simultaneously attached to a single database connection.

th3/req1/attach01.test:207

/* IMP: R-06367-56981 */
# EVIDENCE-OF: R-06367-56981 There is a limit, set using sqlite3_limit()
# and SQLITE_LIMIT_ATTACHED, to the number of databases that can be
# simultaneously attached to a single database connection.