# huangzhibiao/BGFMDB

BGFMDB让数据的增删改查分别只需要一行代码即可,就是这么简单任性，本库几乎支持存储ios所有基本的自带数据类型.

Repository: https://github.com/huangzhibiao/BGFMDB
Canonical: https://ross.abutalabs.com/products/bgfmdb
Language: Objective-C
License Family: other
Topics: coredata, lkdbhelper, realm, fmdb, sqlite, jrdb, ios
Last push: 2023-07-21T08:14:17+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3626, "days_push": 1139, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1440, forks 324 (observed 2026-08-28T04:04:44.154013+00:00)

## What it is
BGFMDB is an Objective-C library built on top of FMDB/SQLite that provides object-relational mapping for iOS models, allowing CRUD operations with a single line of code. It natively supports storing nearly all iOS built-in types including collections like NSArray, NSDictionary, NSMapTable, and NSHashTable, which competing solutions like Realm and Core Data handle poorly.

## Use cases
- persist iOS model objects to SQLite with one-line CRUD calls
- store collections like arrays and dictionaries directly in a local database
- find a simpler alternative to Core Data or Realm for iOS apps
- save custom object types and mixed-type arrays to a local store
- define primary keys, composite keys, and unique constraints on models
- encrypt the local SQLite database with SQLCipher

## When to choose
- you are building an iOS app in Objective-C and want minimal-boilerplate SQLite persistence
- you need to persist collection types (NSArray, NSDictionary, NSMapTable, NSHashTable) that Realm does not support
- you want automatic handling of mixed-type custom objects within arrays
- you prefer Chinese documentation and a lightweight wrapper over heavyweight frameworks like RestKit or MMRecord
- you need auto-increment primary keys, composite primary keys, or unique constraints with simple class-method configuration

## When to avoid
- you are writing a pure Swift project and need to persist Swift-native model classes (only Objective-C models are supported)
- you need cross-platform support beyond iOS
- you require an actively maintained library with recent commits and formal licensing
- you prefer Apple's Core Data with its ecosystem, migrations, and iCloud sync
- you need advanced ORM features like complex joins, migrations, or multi-threaded transaction control out of the box

## Facets
- artifact type: library
- maturity: maintenance
- function: database, orm, serialization
- domain: databases, mobile-development, developer-tools
- platform: -
- tags: fmdb, sqlite, object-mapping, persistence, cocoapods, core-data-alternative, realm-alternative, chinese-documentation, ios, objective-c, mobile, cocoa

## Member repositories
- huangzhibiao/BGFMDB (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:44.154013+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:36:31.564917+00:00, confidence not recorded.
  - readme: https://github.com/huangzhibiao/BGFMDB (fetched 2026-08-28T04:04:44.154013+00:00, sha 8c85f58566d4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
