© Kevin Languedoc 2016

Kevin Languedoc, Build iOS Database Apps with Swift and SQLite, 10.1007/978-1-4842-2232-4_10

10. Working with Multiple Databases

Kevin Languedoc

(1)Montreal, Canada

SQLite has a great feature for managing large volumes of data: multi-database apps. In this chapter, you'll see that by creating and attaching multiple databases to the same connection you can improve disk I/O performance and reliability.

Here are the topics covered:

  • Overview of the ATTACH function

  • Detaching databases using DETACH

  • Multi-database limits

  • Creating joins

  • Working with ATTACH AND DETACH in Swift

The ATTACH Statement

SQLite 3 provides the ATTACH DATABASE statement for multi-database queries. Although you could manage multiple database connections via an Objective-C ...

Get Build iOS Database Apps with Swift and SQLite now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.