Benutzer:J*/Ka-Mel-Oh/Testgelände/Datenbank: Unterschied zwischen den Versionen
< Benutzer:J* | Ka-Mel-Oh | Testgelände
Zur Navigation springen
Zur Suche springen
J* (Diskussion | Beiträge) (Die Seite wurde neu angelegt.) |
J* (Diskussion | Beiträge) |
||
| Zeile 3: | Zeile 3: | ||
==Datenbankarchitektur== | ==Datenbankarchitektur== | ||
| − | === | + | ===cards=== |
{| {{prettytable}} | {| {{prettytable}} | ||
! | ! | ||
| Zeile 87: | Zeile 87: | ||
| | | | ||
|} | |} | ||
| + | |||
| + | ====Indices==== | ||
| + | *unique: id | ||
| + | |||
| + | ===effects=== | ||
| + | {| {{prettytable}} | ||
| + | ! | ||
| + | !id | ||
| + | !evokerId | ||
| + | !hook | ||
| + | !effectXML | ||
| + | |- style="font-size: 80%" | ||
| + | !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=== | ||
| + | {| {{prettytable}} | ||
| + | ! | ||
| + | !id | ||
| + | !striker | ||
| + | !defender | ||
| + | !ts | ||
| + | !status | ||
| + | |- style="font-size: 80%" | ||
| + | !Hinweis | ||
| + | |PK | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | |- | ||
| + | !Datentypen | ||
| + | |string | ||
| + | |string | ||
| + | |date (oder int) | ||
| + | |enum | ||
| + | |- | ||
| + | !JOINs | ||
| + | | | ||
| + | |wiki-username | ||
| + | |wiki-username | ||
| + | | | ||
| + | | | ||
| + | |} | ||
| + | ====Indices==== | ||
| + | *unique: id | ||
| + | *unique: striker, defender (noch unklar) | ||
| + | |||
| + | ===gameCards=== | ||
| + | {| {{prettytable}} | ||
| + | ! | ||
| + | !id | ||
| + | !gameId | ||
| + | !cardId | ||
| + | !player | ||
| + | !position | ||
| + | |- style="font-size: 80%" | ||
| + | !Hinweis | ||
| + | |PK | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | |- | ||
| + | !Datentypen | ||
| + | |int | ||
| + | |int | ||
| + | |int | ||
| + | |bool, enum | ||
| + | |int, string | ||
| + | |- | ||
| + | !JOINs | ||
| + | |games.id | ||
| + | |cards.id | ||
| + | |wiki-username? | ||
| + | | | ||
| + | |} | ||
| + | |||
| + | ====Indices==== | ||
| + | *unique: id | ||
| + | *unique: gameId, position, player | ||
| + | *gameId | ||
| + | *cardId | ||
Version vom 27. Februar 2009, 22:53 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, string |
| JOINs | games.id | cards.id | wiki-username? |
Indices
- unique: id
- unique: gameId, position, player
- gameId
- cardId