https://github.com/allancalix/recursive-doc-model
Explores recursive document models using Postgresql
https://github.com/allancalix/recursive-doc-model
postgresql relational-model sql
Last synced: about 1 year ago
JSON representation
Explores recursive document models using Postgresql
- Host: GitHub
- URL: https://github.com/allancalix/recursive-doc-model
- Owner: allancalix
- Created: 2021-07-02T21:32:06.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-02T21:34:12.000Z (almost 5 years ago)
- Last Synced: 2025-06-14T21:03:22.412Z (about 1 year ago)
- Topics: postgresql, relational-model, sql
- Language: Makefile
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# recursive-doc-model
Explores using a relational model to express a recursive document model where
one document (origin) can reference another (destination). Destination documents
can also contain references.
The first question explored here is how can we collect a specific attriibute,
in this case _ingredients_, for all documents referenced by the origin document
(either directly or indirectly).
## Try it yourself
Depends on:
1. psql
1. docker compose (built in to newer Docker cli versions)
### Commands
```bash
# Start
make
# Stop
make clean
# Example query
psql "postgres://admin:test123@localhost:5432" -f sql/query.sql
```