1 | delete from UserHasProgram;
|
---|
2 | delete from UserHasDay;
|
---|
3 | delete from DayHasMeal;
|
---|
4 | delete from MealHasIngredient;
|
---|
5 | delete from DayHasWorkout;
|
---|
6 | delete from WorkoutHasExercise;
|
---|
7 | delete from WorkoutProgramHasWorkout;
|
---|
8 |
|
---|
9 | delete from _User;
|
---|
10 | delete from _Day;
|
---|
11 | delete from Meal;
|
---|
12 | delete from Ingredient;
|
---|
13 | delete from PersonalizedIngredient;
|
---|
14 | delete from Workout;
|
---|
15 | delete from Exercise;
|
---|
16 | delete from PersonalizedExercise;
|
---|
17 | delete from WorkoutProgram;
|
---|
18 |
|
---|
19 |
|
---|
20 |
|
---|
21 | INSERT INTO _User (uID, name, password, age, height, weight, role)
|
---|
22 | VALUES
|
---|
23 | (1, 'JohnDoe', 'password123', 25, 180, 75, 'user'),
|
---|
24 | (2, 'JaneDoe', 'securepass', 30, 165, 60, 'admin');
|
---|
25 |
|
---|
26 |
|
---|
27 |
|
---|
28 |
|
---|
29 | INSERT INTO _Day (dID, date)
|
---|
30 | VALUES
|
---|
31 | (1, '2024-02-08'),
|
---|
32 | (2, '2024-02-09');
|
---|
33 |
|
---|
34 |
|
---|
35 |
|
---|
36 | INSERT INTO Workout (wID, duration, name, uID)
|
---|
37 | VALUES
|
---|
38 | (1, 60, 'Morning Workout', 1),
|
---|
39 | (2, 45, 'Evening Workout', 2);
|
---|
40 |
|
---|
41 |
|
---|
42 |
|
---|
43 | INSERT INTO Meal (mID, name, type, uID)
|
---|
44 | VALUES
|
---|
45 | (1, 'Breakfast', 'Healthy', 1),
|
---|
46 | (2, 'Lunch', 'Balanced', 2);
|
---|
47 |
|
---|
48 |
|
---|
49 | INSERT INTO Ingredient (iID, name, calories, protein, carbs, fats)
|
---|
50 | VALUES
|
---|
51 | (1, 'Eggs', 70, 6, 1, 5),
|
---|
52 | (2, 'Chicken Breast', 165, 31, 0, 3);
|
---|
53 |
|
---|
54 |
|
---|
55 |
|
---|
56 | INSERT INTO PersonalizedIngredient (piID, quantity, iID)
|
---|
57 | VALUES
|
---|
58 | (1, 2, 1),
|
---|
59 | (2, 150, 2);
|
---|
60 |
|
---|
61 |
|
---|
62 |
|
---|
63 | INSERT INTO Exercise (eID, name, type)
|
---|
64 | VALUES
|
---|
65 | (1, 'Running', 'Cardio'),
|
---|
66 | (2, 'Bench Press', 'Bodybuilding');
|
---|
67 |
|
---|
68 |
|
---|
69 |
|
---|
70 | INSERT INTO PersonalizedExercise (pID, reps, sets, weight, time, eID)
|
---|
71 | VALUES
|
---|
72 | (1, 10, 3, 50, NULL, 1),
|
---|
73 | (2, 12, 4, 80, NULL, 2);
|
---|
74 |
|
---|
75 |
|
---|
76 |
|
---|
77 | INSERT INTO WorkoutProgram (wpID, name)
|
---|
78 | VALUES
|
---|
79 | (1, 'Weight Loss Program'),
|
---|
80 | (2, 'Muscle Building Program');
|
---|
81 |
|
---|
82 |
|
---|
83 |
|
---|
84 | INSERT INTO UserHasDay (uID, dID)
|
---|
85 | VALUES
|
---|
86 | (1, 1),
|
---|
87 | (2, 2);
|
---|
88 |
|
---|
89 |
|
---|
90 |
|
---|
91 | INSERT INTO UserHasProgram (uID, wpID)
|
---|
92 | VALUES
|
---|
93 | (1, 1),
|
---|
94 | (2, 2);
|
---|
95 |
|
---|
96 |
|
---|
97 |
|
---|
98 | INSERT INTO DayHasWorkout (wID, dID)
|
---|
99 | VALUES
|
---|
100 | (1, 1),
|
---|
101 | (2, 2);
|
---|
102 |
|
---|
103 |
|
---|
104 |
|
---|
105 | INSERT INTO WorkoutProgramHasWorkout (wID, wpID)
|
---|
106 | VALUES
|
---|
107 | (1, 1),
|
---|
108 | (2, 2);
|
---|
109 |
|
---|
110 |
|
---|
111 | INSERT INTO DayHasMeal (mID, dID)
|
---|
112 | VALUES
|
---|
113 | (1, 1),
|
---|
114 | (2, 2);
|
---|
115 |
|
---|
116 |
|
---|
117 | INSERT INTO MealHasIngredient (mID, iID)
|
---|
118 | VALUES
|
---|
119 | (1, 1),
|
---|
120 | (2, 2);
|
---|
121 |
|
---|
122 |
|
---|
123 | INSERT INTO WorkoutHasExercise (eID, wID)
|
---|
124 | VALUES
|
---|
125 | (1, 1),
|
---|
126 | (2, 2);
|
---|
127 |
|
---|
128 |
|
---|
129 |
|
---|
130 |
|
---|