55 lines
3.6 KiB
Markdown

---
_layout: landing
---
# Using Relational Databases as Document Stores
_(this is a work-in-progress landing page for libraries that allow PostgreSQL and SQLite to be treated as document databases; it will eventually explain the concepts behind this, allowing the documentation for each library to focus more on "how" and less on "why")_
## Code
These libraries provide a convenient <abbr title="Application Programming Interface">API</abbr> to treat PostgreSQL or SQLite as document stores.
**BitBadger.Documents** ~ [Documentation][docs-dox] ~ [Git][docs-git]<br>
Use for .NET applications (C#, F#)
**PDODocument** ~ [Documentation][pdoc-dox] ~ [Git][pdoc-git]<br>
Use for PHP applications (8.2+)
**solutions.bitbadger.documents** ~ Documentation _(soon)_ ~ Git _(soon)_<br>
Use for <abbr title="Java Virtual Machine">JVM</abbr> applications (Java, Kotlin, Groovy, Scala)
## Concepts
When we use the term "documents" in the context of databases, we are referring to a database that stores its entries in a data format (usually a form of JavaScript Object Notation, or JSON). Unlike relational databases, document databases tend to have a relaxed schema; often, document collections or tables are the only definition required - and some even create those on-the-fly the first time one is accessed!
> [!NOTE]
> This content was originally hosted on the [Bit Badger Solutions][] main site; references to "the software that runs this site" is referencing [myWebLog][], an application which uses the .NET version of this library to store its data in a hybrid relational / document format.
_Documents marked as "wip" are works in progress (i.e., not complete). All of these pages should be considered draft quality; if you are reading this, welcome to the early access program!_
**[A Brief History of Relational Data][hist]**<br>Before we dig in on documents, we'll take a look at some relational database concepts
**[What Are Documents?][what]**<br>How documents can represent flexible data structures
**[Relational / Document Trade-Offs][trade]**<br>Considering the practical pros and cons of different data storage paradigms
**[Application Trade-Offs][app]**<br>Options for applications utilizing relational or document data
**[Hybrid Data Stores][hybrid]**<br>Combining document and relational data paradigms _(wip)_
[docs-dox]: ./dotnet/ "BitBadger.Documents • Bit Badger Solutions"
[docs-git]: https://git.bitbadger.solutions/bit-badger/BitBadger.Documents "BitBadger.Documents • Bit Badger Solutions Git"
[pdoc-dox]: ./php/ "PDODocument • Bit Badger Solutions"
[pdoc-git]: https://git.bitbadger.solutions/bit-badger/pdo-document "PDODocument • Bit Badger Solutions Git"
[jvm-dox]: ./jvm/ "solutions.bitbadger.documents • Bit Badger Solutions"
[jvm-git]: https://git.bitbadger.solutions/bit-badger/solutions.bitbadger.documents "solutions.bitbadger.documents • Bit Badger Solutions Git"
[Bit Badger Solutions]: https://bitbadger.solutions "Bit Badger Solutions"
[myWebLog]: https://bitbadger.solutions/open-source/myweblog/ "myWebLog &bull; Bit Badger Solutions"
[hist]: ./concepts/a-brief-history-of-relational-data.md "A Brief History of Relational Data • Bit Badger Solutions"
[what]: ./concepts/what-are-documents.md "What Are Documents? • Bit Badger Solutions"
[trade]: ./concepts/relational-document-trade-offs.md "Relational / Document Trade-Offs • Bit Badger Solutions"
[app]: ./concepts/application-trade-offs.md "Application Trade-Offs • Bit Badger Solutions"
[hybrid]: ./concepts/hybrid-data-stores.md "Hybrid Data Stores • Bit Badger Solutions"