Modele De Donnees
Conventions de nommage
- Le premier caractère du nom de chaque champ doit indiquer le type du champ concerné.
- i : Integer (exemple : iFeet représentera le nombre de pieds d'une difficulté de song. Il s'agira d'un champ de type INTEGER)
- s : String (ou VARCHAR)
- t : TimeStamp (Date et Heure)
- Toute clé de table devra être préfixée du mot "key" et être un champ de type INTEGER.
- keySong : représente la clé de la table Song, ce champ possède donc au moins les attributs INTEGER et PRIMARY KEY
Partie "Songs"
/* In The Groove 1, In The Groove 2, ... */ CREATE TABLE Pack ( keyPack INTEGER, sName VARCHAR(255) NOT NULL, PRIMARY KEY(keyPack) ); /* Vertex, BloodRush, Utopia, ... */ CREATE TABLE Song ( keySong INTEGER, keyPack INTEGER, sName VARCHAR(255) NOT NULL, PRIMARY KEY(keySong) FOREIGN KEY(keyPack) REFERENCES Pack(keyPack) ); /* A discuter : - Représenter les niveaux par une lettre (N=Novice | E=Easy | M=Medium | H=Hard | X=Expert ) Mais limitation à ITG OU - Représenter tous les niveaux, y compris les différents noms des niveaux de DDR (Oni/Challenge DDR correspondant à Expert ITG), avec un terme préféré par niveau, pour pas choquer les joueurs CREATE TABLE Difficulty ( keyDifficulty INTEGER, sName VARCHAR(255) NOT NULL, sAliasOf INTEGER, PRIMARY KEY(keyDifficulty), FOREIGN KEY(sAliasOf) REFERENCES Difficulty(keyDifficulty) ); - Se limiter aux songs d'ITG (avec les attributs de type iTotalMines) - Entrer des chansons de DDR, mais du coup il faut connaitre les caractéristiques (steps, jumps, holds) de DDR, peut être via StepMania mais il faut avoir exactement les mêmes stepfiles que la borne ? Attention : si ouverture aux songs DDR, il faut prendre en compte le score global (car non recalculable), et donc rajouter un champ dScore dans la table Score Attention : modèle uniquement pour les résultats de songs individuelles et personnelles, pas pour les tournois */ /* Max300 SMMM 10 Expert */ CREATE TABLE Stage ( keyStage INTEGER, keySong INTEGER NOT NULL, iFeet INTEGER NOT NULL, sDifficulty VARCHAR(255) NOT NULL, /* keyDifficulty INTEGER NOT NULL, */ iTotalSteps INTEGER NOT NULL, iTotalHolds INTEGER NOT NULL, iTotalJumps INTEGER NOT NULL, iTotalMines INTEGER NOT NULL, iTotalHands INTEGER NOT NULL, iTotalRolls INTEGER NOT NULL, PRIMARY KEY(keyStage), FOREIGN KEY(keySong) REFERENCES Song(keySong) /* FOREIGN KEY(keyDifficulty) REFERENCES Difficulty(keyDifficulty) */ );
Partie "Fiche joueur"
Ici, la table "Joueur" n'est presque pas décrite. Pour le moment elle n'a été pensée que pour stocker des scores (voir section suivante).
/* Theymey, THK, Jer */ CREATE TABLE Player ( keyPlayer INTEGER, sFirstName VARCHAR(255), sLastName VARCHAR(255), sNickName VARCHAR(255) NOT NULL, PRIMARY KEY(keyPlayer) );
Partie "Ranking individuel"
L'objectif est de se focaliser sur le stockage des résultats des joueurs
CREATE TABLE Score ( keyScore INTEGER, keyPlayer INTEGER NOT NULL, keyStage INTEGER NOT NULL, tDate TIMESTAMP NOT NULL, iFantastic INTEGER NOT NULL, iExcellent INTEGER NOT NULL, iGreat INTEGER NOT NULL, iDecent INTEGER NOT NULL, iWayOff INTEGER NOT NULL, iMiss INTEGER NOT NULL, iJumps INTEGER NOT NULL, iHolds INTEGER NOT NULL, iMines INTEGER NOT NULL, iHands INTEGER NOT NULL, iRolls INTEGER NOT NULL, iMaxCombo INTEGER NOT NULL, PRIMARY KEY(keyScore), FOREIGN KEY(keyPlayer) REFERENCES Player(keyPlayer), FOREIGN KEY(keyStage) REFERENCES Stage(keyStage) );
page_revision: 0, last_edited: 1206451447|%e %b %Y, %H:%M %Z (%O ago)





