I have my app using core data with the data model below. However, I’m switching to a standard database with columns and rows. Can anyone help me with setting up this new database schema?

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First of all you need to create tables for each of the Entities and their attributes (note I added “id” to each of the tables for relationships):
Now that you have tables that describe each of the entities, you need to create tables that will describe the relationships between these entities – as before table names are in capitals and their fields are in parenthesis:
That’s it! Now if you need to add an exercise to a routine, you simply:
This will hold true for all the rest of the relationships.
NOTE: Your core data model has one-to-many and many-to-many relationships. If you want to specifically enforce that a relationship is one-to-many (e.g. Exercise can only have 1 routine), then you will need to make “exercise_id” as the index for the RoutineExercises table. If you want a many-to-many relationships to be allowed (i.e. each exercise is allowed to have multiple routines), then set the tuple of (routine_id, exercise_id) as the index.