An open API service indexing awesome lists of open source software.

https://github.com/alvincrespo/data_models

Data model examples to help inspire.
https://github.com/alvincrespo/data_models

data-modeling database ruby-on-rails

Last synced: 5 months ago
JSON representation

Data model examples to help inspire.

Awesome Lists containing this project

README

          

# Example Data Models

The goal of this project is to showcase example data models for real world applications. The content in this repository should
be a conversation starter and not the end all be all.

This project is inspired by "[Database Answers](https://web.archive.org/web/20140209035055/http://databaseanswers.org/data_models/index.htm)".

## Setup

The setup here assumes you have Ruby and Docker installed and setup on your local computer.

Clone the repo.

```sh
git clone git@github.com:alvincrespo/data_models.git
```

Start the database container.

```sh
docker compose up
```

Navigate to the desired project:

```sh
cd examples/ecommerce
```

Run bundle install:

```sh
bundle
```

or

```sh
bundle install
```

Create the database

```sh
bundle exec rails db:create
```

Migrate the database

```sh
bundle exec rails db:migrate
```

Congrats! You have now setup the application and can start tinkering with the example.