Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Swift
  3. SQLiteDB

SQLiteDB

Swift

A lightweight SQLite wrapper and ORM for Swift 4.x, enabling direct database access and automatic table creation.

GitHubGitHub
591 stars150 forks0 contributors

What is SQLiteDB?

SQLiteDB is a lightweight SQLite wrapper and ORM for Swift 4.x that simplifies database interactions by providing direct SQL access and an object-relational mapping layer. It allows developers to execute queries with parameter binding and manage database tables using Swift classes, reducing the need for boilerplate SQL code. The library supports both pre-loaded databases and automatic table creation, making it versatile for various application needs.

Target Audience

Swift developers building iOS or macOS applications that require local data persistence with SQLite, particularly those seeking a simple, ORM-like interface without heavy dependencies.

Value Proposition

Developers choose SQLiteDB for its simplicity, lightweight design, and seamless integration with Swift, offering both low-level SQL control and a convenient ORM layer. Its automatic schema management and support for multiple database instances reduce development overhead compared to raw SQLite usage.

Overview

Basic SQLite wrapper for Swift 4.x and lightweight ORM for accessing underlying tables in an SQLite database

Use Cases

Best For

  • Swift apps needing a simple SQLite wrapper without external dependencies
  • Projects requiring automatic database table creation from Swift classes
  • Developers who prefer an ORM-like interface for SQLite in Swift
  • iOS or macOS apps with pre-loaded SQLite database files
  • Applications that mix direct SQL queries with object-based data access
  • Prototyping or small projects where lightweight database solutions are preferred

Not Ideal For

  • Projects requiring complex data relationships and advanced ORM features like joins or lazy loading
  • Teams needing robust database migration tools beyond automatic schema creation
  • Applications with high-concurrency requirements where thread safety is critical
  • Cross-platform projects beyond iOS and macOS, as it's Swift-specific and relies on Xcode setup

Pros & Cons

Pros

Direct SQL with Binding

Supports parameter binding in SQL queries, preventing SQL injection and enhancing security, as demonstrated in the usage examples for safe query execution.

Lightweight ORM Layer

The SQLTable class allows modeling database tables as Swift classes, reducing boilerplate code for CRUD operations without heavy dependencies.

Automatic Schema Management

Automatically creates and updates database tables based on class properties, simplifying development iterations, as noted in the SQLTable usage section.

Flexible Initialization Options

Supports both pre-loaded database files and dynamic creation at runtime, offering versatility for different application needs, per the adding to project instructions.

Cons

Limited ORM Capabilities

Lacks features for complex relationships, transactions, and advanced migrations, focusing only on basic CRUD operations, which may require manual SQL for sophisticated queries.

Breaking Changes Risk

Recent updates changed method names (e.g., openDB to open) and row numbering from 1-based to 0-based, as warned in the README, potentially breaking existing code without seamless migration paths.

Incomplete Cloud Support

Cloud database functionality is explicitly marked as not ready for production in the README update note, limiting its use for synced or distributed data scenarios.

Frequently Asked Questions

Quick Stats

Stars591
Forks150
Contributors0
Open Issues2
Last commit3 years ago
CreatedSince 2014

Tags

#mobile-database#orm#ios#data-persistence#sqlite-database#lightweight#sqlite#database-wrapper#swift#macos

Built With

S
SQLite
S
Swift

Included in

Swift26.0k
Auto-fetched 17 hours ago

Related Projects

SQLite.swiftSQLite.swift

A type-safe, Swift-language layer over SQLite3.

Stars10,185
Forks1,612
Last commit28 days ago
GRDB.swiftGRDB.swift

A toolkit for SQLite databases, with a focus on application development

Stars8,563
Forks993
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub