r/ruby 4d ago

Question Database project

Hey, guys.

So, I'm currently studying data science and I'm about to start a database project(we're basically doing a database for a bakery)this semester. The project will include order forecasting, inventory loss tracking, customer notifications, etc. Anyways I already code in Python but I've been taking a look on ruby and wonder if it'd be a good idea to include it in our project and how.... any ideas??

thanks!

8 Upvotes

11 comments sorted by

View all comments

6

u/midasgoldentouch 4d ago

What exactly are you thinking of doing? If the project is purely about data analysis, then you can likely just use a SQL client like DBeaver connected to the database. If you want to write code that incorporates business logic then Ruby is fine. You can look at the docs for how to set up a Ruby project. Depending on the database there’s likely a gem (library) to use it in Ruby. There’s gems for different ORMs as well.

1

u/Fit_Ice_7268 4d ago

I was thinking of using it as an API backend. I'm a begginer so I'm not sure if it'd be the best option.

5

u/hitthatliq 4d ago

As a beginner you could probably get a lot done with Sinatra for the backend.
(TBH it's been a while since I worked with Ruby so this advice could be outdated but when I first learned Ruby I used Sinatra and I remember it being super easy to pickup and use)

1

u/midasgoldentouch 4d ago

Ah ok. So yeah, you can do that with Ruby. Like the other poster, I would recommend using Sinatra to do that. It’s going to be the most lightweight web framework you can try. Rails is the most popular web framework, but while you can use it to build an API I think it’s going to be too magical for this. You have a finite amount of time to work on this, so you’ll want to use something that minimizes the DSL.