Ask A Question

Notifications

You’re not receiving notifications from this thread.

How to transform this spreadsheet into a database model - see example code

Sebastian asked in Databases

Hi everyone!

I have to transform this spreadsheet Spreadsheet into database model. This spreadsheet is part of a apprenticeship curriculum in germany, in case you want to be a mechatronics engineer.

Step 12 is easy. We have a Current Number, a Title, a Description and a Amount of Weeks to teach in Year of training

Milestone
 current_number: int
 title: string
 description: text
 duration_in_weeks: int
 year_of_training: int
end

So. I'am struggling with step 13 We have a topic with different steps to teach in different years of training. So my plan is to split the Milestone Model and add a MilestoneStep Model with a One-To-Many Relationship because a Milestone can have many different steps.

MilestoneStep
 description: text
 duration_in_weeks: int
 year_of_training: int
end
Milestone
 current_number: int
 title: string
end

Is this the way to go, or am i missing something and doing things completely wrong? I really appreciate your help!

Kind regards,
Sebastian

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.