| 1 | = Legends of the Balkans - Relational Design = |
| 2 | |
| 3 | == Signs == |
| 4 | Below are the annotations used in the relational schema: |
| 5 | |
| 6 | - `*` (asterisk) → Denotes a **Primary Key**. |
| 7 | - `#` (hash) → Denotes a **Foreign Key**. |
| 8 | - `(A, B, C)` → Represents the attributes within a table. |
| 9 | - `[ ]` → Represents optional fields (nullable). |
| 10 | |
| 11 | == Tables == |
| 12 | |
| 13 | Full list of tables: |
| 14 | - `Player (*PlayerID, Username, Email, Password)` |
| 15 | - `Character (*CharacterID, #PlayerID, Name, Health, EXP, Gold)` |
| 16 | - `Faction (*FactionID, Name, Description)` |
| 17 | - `Reputation (*#CharacterID, *#FactionID, ReputationPoints, Rank)` |
| 18 | - `Quest (*QuestID, Name, EXP_Required, EXP_Reward, Gold_Reward)` |
| 19 | - `Item (*ItemID, Name, Type, Rarity, Craftable)` |
| 20 | - `Enemy (*EnemyID, Name, Health, Damage, LootDrop)` |
| 21 | - `Trader (*TraderID, Name, Type)` |
| 22 | - `Market (*MarketID, #ItemID, #SellerID, Price)` |
| 23 | - `Guild (*GuildID, Name, #LeaderID)` |
| 24 | - `Character_Quest (*#CharacterID, *#QuestID)` |
| 25 | - `Character_Item (*#CharacterID, *#ItemID)` |
| 26 | - `Enemy_Item (*#EnemyID, *#ItemID)` |
| 27 | - `Trader_Item (*#TraderID, *#ItemID)` |
| 28 | - `Character_Guild (*#CharacterID, *#GuildID)` |
| 29 | |
| 30 | == DDL Script == |
| 31 | The **Data Definition Language (DDL) script** defines the database schema. |
| 32 | The SQL file will be attached here: |
| 33 | |
| 34 | [[Attachment:lotb_ddl.sql]] |
| 35 | |
| 36 | == DML Script == |
| 37 | The **Data Manipulation Language (DML) script** contains sample data insertions. |
| 38 | The SQL file will be attached here: |
| 39 | |
| 40 | [[Attachment:lotb_dml.sql]] |
| 41 | |
| 42 | == Relational Diagram == |
| 43 | The relational schema diagram will be placed here: |
| 44 | |
| 45 | [[Image(lotb_rd.png)]] |