| 4 | |
| 5 | **Events** |
| 6 | * **Global_Event_Id** (PK) |
| 7 | * Sql_Date |
| 8 | * Month_Year |
| 9 | * Year |
| 10 | * Fraction_Date |
| 11 | * Is_Root_Event |
| 12 | * Event_Code |
| 13 | * Goldstein_Scale |
| 14 | * Num_Mentions |
| 15 | * Num_Sources |
| 16 | * Num_Articles |
| 17 | * Avg_Tone |
| 18 | |
| 19 | **Actors** |
| 20 | * **Actor_Id** (PK) |
| 21 | * Actor_Code |
| 22 | * Actor_Name |
| 23 | * Country_Code |
| 24 | * Type_Code |
| 25 | |
| 26 | **Locations** |
| 27 | * **Location_Id** (PK) |
| 28 | * Full_Name |
| 29 | * Country_Code |
| 30 | * Adm1_Code |
| 31 | * Latitude |
| 32 | * Longitude |
| 33 | * Feature_Id |
| 34 | |
| 35 | **Event_Details** |
| 36 | * **Global_Event_Id** (FK) |
| 37 | * **Actor_Id** (FK) |
| 38 | * **Location_Id** (FK) |
| 39 | |
| 40 | **Users** |
| 41 | * **User_Id** (PK) |
| 42 | * First_Name |
| 43 | * Last_Name |
| 44 | * Email |
| 45 | * Password_Hash |
| 46 | * Role_Id (FK) |
| 47 | |
| 48 | **Roles** |
| 49 | * **Role_Id** (PK) |
| 50 | * Role_Name |
| 51 | |
| 52 | **Plan** |
| 53 | * **Plan_Id** (PK) |
| 54 | * Plan_Name |
| 55 | * Max_Events |
| 56 | * Max_Notifications |
| 57 | |
| 58 | **Subscription** |
| 59 | * **Subscription_Id** (PK) |
| 60 | * **User_Id** (FK) |
| 61 | * **Plan_Id** (FK) |
| 62 | * Start_Date |
| 63 | * End_Date |
| 64 | * Status |
| 65 | |
| 66 | **Notifications** |
| 67 | * **Notification_Id** (PK) |
| 68 | * **User_Id** (FK) |
| 69 | * **Event_Id** (FK) |
| 70 | * Notification_Date |
| 71 | * Status |
| 72 | |
| 73 | **Predictions** |
| 74 | * **Prediction_Id** (PK) |
| 75 | * **Event_Id** (FK) |
| 76 | * **Actor_Id** (FK) |
| 77 | * **Location_Id** (FK) |
| 78 | * Predicted_Date |
| 79 | * Prediction_Type |
| 80 | * Confidence_Score |
| 81 | |
| 82 | **Conflict_Risk** |
| 83 | * **Conflict_Id** (PK) |
| 84 | * **Actor1_Id** (FK) |
| 85 | * **Actor2_Id** (FK) |
| 86 | * Risk_Score |
| 87 | * Predicted_Date |
| 88 | * Description |
| 89 | |
| 90 | **Trends** |
| 91 | * **Trend_Id** (PK) |
| 92 | * **Actor_Id** (FK) |
| 93 | * **Event_Id** (FK) |
| 94 | * Date |
| 95 | * Conflict_Coefficient |
| 96 | * Mentions_Count |
| 97 | * Avg_Tone |
| 98 | * Description |
| 99 | |
| 100 | === Релации === |
| 101 | |
| 102 | **Events** |
| 103 | * 1:N со **Event_Details** |
| 104 | * 1:N со **Notifications** |
| 105 | * 1:N со **Predictions** |
| 106 | * 1:N со **Trends** |
| 107 | |
| 108 | **Actors** |
| 109 | * 1:N со **Event_Details** |
| 110 | * 1:N со **Predictions** |
| 111 | * 1:N со **Conflict_Risk** |
| 112 | * 1:N со **Trends** |
| 113 | |
| 114 | **Locations** |
| 115 | * 1:N со **Event_Details** |
| 116 | * 1:N со **Predictions** |
| 117 | |
| 118 | **Event_Details** |
| 119 | * N:1 со **Events** |
| 120 | * N:1 со **Actors** |
| 121 | * N:1 со **Locations** |
| 122 | |
| 123 | **Users** |
| 124 | * 1:N со **Subscription** |
| 125 | * 1:N со **Notifications** |
| 126 | |
| 127 | **Roles** |
| 128 | * 1:N со **Users** |
| 129 | |
| 130 | **Plan** |
| 131 | * 1:N со **Subscription** |
| 132 | |
| 133 | **Subscription** |
| 134 | * N:1 со **Users** |
| 135 | * N:1 со **Plan** |
| 136 | |
| 137 | **Notifications** |
| 138 | * N:1 со **Users** |
| 139 | * N:1 со **Events** |
| 140 | |
| 141 | **Predictions** |
| 142 | * N:1 со **Events** |
| 143 | * N:1 со **Actors** |
| 144 | * N:1 со **Locations** |
| 145 | |
| 146 | **Conflict_Risk** |
| 147 | * N:1 со **Actors** |
| 148 | |
| 149 | **Trends** |
| 150 | * N:1 со **Actors** |
| 151 | * N:1 со **Events** |
| 152 | |