Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. Account:
  2.  
  3. A_ID int NOT NULL UNIQUE
  4. nickname varchar(32) NOT NULL UNIQUE
  5. password varchar(16) NOT NULL
  6. PRIMARY KEY (A_ID)
  7. CHECK(Whether the amount of linked accounts does not exceed the number of 8)
  8.  
  9. Character:
  10.  
  11. C_ID int NOT NULL UNIQUE PRIMARY KEY
  12. name varchar(32) NOT NULL UNIQUE
  13.  
  14. level int NOT NULL
  15. CHECK(level >= 0 and level <= 2715)
  16. class int NOT NULL
  17. race int NOT NULL
  18. FOREIGN KEY (A_ID) REFERENCES Account(A_ID)
  19.  
  20. Bank_Balance:
  21.  
  22. C_ID int NOT NULL UNIQUE
  23. FOREIGN KEY (C_ID) REFERENCES Character(C_ID)
  24.  
  25. copper_coins int NOT NULL
  26. CHECK(copper_coins >= 0 and copper_coins <= 9999)
  27. silver_coins int NOT NULL
  28. CHECK(silver_coins >= 0 and copper_coins <= 9999)
  29. gold_coins int NOT NULL
  30. CHECK(gold_coins >= 0 and copper_coins <= 9999)
  31.  
  32. Equipment:
  33.  
  34. C_ID int NOT NULL UNIQUE
  35. FOREIGN KEY (C_ID) REFERENCES Character(C_ID)
  36. armor int
  37. enchants int
  38. accessoiries int
  39.  
  40. Guild:
  41.  
  42. guild_ID int
  43. CHECK(Whether the player still exists in database)
  44.  
  45. Player Rankings:
  46.  
  47. C_ID int NOT NULL UNIQUE
  48. FOREIGN KEY (C_ID) REFERENCES Character(C_ID)
  49. name varchar(32) NOT NULL UNIQUE
  50. ranking_placement int
  51. CHECK(ranking_placement >= 1 and ranking_placement <= sp_spaceused Character)
  52.  
  53.  
  54. Battle_Logs:
  55.  
  56. L_ID int NOT NULL UNIQUE
  57. PRIMARY KEY(L_ID)
  58. C_ID int NOT NULL UNIQUE
  59. FOREIGN KEY (C_ID) REFERENCES Character(C_ID)
  60.  
  61. damage_output int NOT NULL
  62. CHECK(damage_output >= 0)
  63. healing_output int NOT NULL
  64. CHECK(healing_output >= 0)
  65. date varchar(9) (Formatted as yyyy/mm/dd)
  66. deaths int NOT NULL
  67. CHECK(deaths >= 0)
  68. kills int NOT NULL
  69. CHECK(kills >= 0)
  70.  
  71. Game_Content:
  72.  
  73. quests int
  74. maps int NOT NULL UNIQUE
  75. enemy_data int NOT NULL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement