Skip to main content

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

Databases • Asked by Sebastian

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


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 22,346+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.