Kamel:J*/Ka-Mel-Oh/Testgelände/Datenbank: Unterschied zwischen den Versionen
J* (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
J* (Diskussion | Beiträge) |
||
| Zeile 175: | Zeile 175: | ||
|int | |int | ||
|bool, enum | |bool, enum | ||
|int, string | |int, enum, string | ||
|- | |- | ||
!JOINs | !JOINs | ||
|games.id | |games.id | ||
|cards.id | |cards.id | ||
| | | | ||
| | |||
| | | | ||
|} | |} | ||
| Zeile 187: | Zeile 188: | ||
*unique: id | *unique: id | ||
*unique: gameId, position, player | *unique: gameId, position, player | ||
Aktuelle Version vom 27. Februar 2009, 22:02 Uhr
Okay, alles nochmal gedanklich umgebaut. Hauptscript als PHP, Datenbank als SQL und nur noch die UI als Javascript.
Datenbankarchitektur
cards
| id | type | title | class | race | costs | ap | dp | lp | instant | |
|---|---|---|---|---|---|---|---|---|---|---|
| Hinweis | PK | |||||||||
| Datentyp | int | enum | String | String | String | short | short | short | short | bool |
| wenn Item | item | null | 0 | 0 | 0 | true | ||||
| wenn Monster | monster | true | ||||||||
| wenn *-zr oder *-fu | false | |||||||||
| JOINs |
Indices
- unique: id
effects
| id | evokerId | hook | effectXML | |
|---|---|---|---|---|
| Hinweis | PK | kein SQL | ||
| Datentyp | int | int | string oder enum | string |
| JOINs | cards.id |
Indices
- unique: id
- unique: evoker, hook (soll hier einer hin?!)
games
| id | striker | defender | ts | status | |
|---|---|---|---|---|---|
| Hinweis | PK | ||||
| Datentypen | string | string | date (oder int) | enum | |
| JOINs | wiki-username | wiki-username |
Indices
- unique: id
- unique: striker, defender (noch unklar)
gameCards
| id | gameId | cardId | player | position | |
|---|---|---|---|---|---|
| Hinweis | PK | ||||
| Datentypen | int | int | int | bool, enum | int, enum, string |
| JOINs | games.id | cards.id |
Indices
- unique: id
- unique: gameId, position, player