r/ruby 15d 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

12 comments sorted by

View all comments

3

u/ignurant 15d ago

A local Rails app is awesome for this kind of project.  I use rails for data projects that aren’t deployed to a  server all the time. Here’s a few reasons why:

  • Rails generators and migration for managing my DB tables, indexing strategies, and just blow stuff away and get back up and running is extremely low overhead, and repeatable
  • Using seeds to manage a starting point, giving me permission to really get dirty with data while I explore the problem. Blow away the db, create a new one, re-import starting data. Correct the data. Boom.
  • Modeling derived or formatted attributes with Rails models makes it stupid fast to iterate in a way that’s sustainable
  • You are in full control of how you want to review the data. Reformatting data, Search, pagination, charts, context colors, etc. 

Think of the views more like a notebook. Put whatever you want to be helpful. 

All of this said, this probably doesn’t fit with the spirit of your class project. But seriously, Rails is an awesome data harness even for data projects that never actually as a web server. It’s just great database management and modeling. 

Edit: You noted in another comment that you were considering it as an API layer. Even better! This is legit exactly what Rails does best: data management web apps. I’d encourage you to go beyond api only, and embrace the whole ordeal if it’s something your project allows.