Advertisement
Braber01

Help with Magic Card Database

Oct 1st, 2012
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.01 KB | None | 0 0
  1. create table CARDS(
  2. `id`INT NOT NULL AUTO_INCREMENT,
  3. `CardName` VARCHAR(50) NOT NULL,
  4. `CManaCost` INT NOT NULL,
  5. `Type` ENUM('Creature','Enchantment','Sorcery','Instant','Land') NOT NULL,
  6. `Rarity` ENUM('Mythic','Rare','Uncommon','Common','Land') NOT NULL,
  7. `Color` ENUM('None','White','Green','Black','Red','Blue') NOT NULL,
  8. `CORE_SETS` INT NULL,
  9. `DUEL_DECKS` INT NULL,
  10. `EXP_SETS` INT NULL,
  11. `PLANECHASE` INT NULL,
  12. `PREMIUM` INT NULL,
  13. `REPRINTS` INT NULL,
  14. PRIMARY KEY(`id`),
  15. CONSTRAINT CoreSetFK REFERENCES CORE_SETS(`id`)
  16.         ON DELETE CASCADE,
  17. CONSTRAINT DuelDecksFK REFRENCES DUEL_DECKS(`id`)
  18.         ON DELETE CASCADE,
  19. CONSTRAINT ExpSetsFK REFRENCES EXP_SETS(`id`)
  20.         ON DELETE CASCADE,
  21. CONSTRAINT VaultFK REFERENCES FROM_THE_VAULT(`id`)
  22.         ON DELETE CASCADE,
  23. CONSTRAINT PlaneChaseFK REFERENCES PLANECHASE(`id`)
  24.         ON DELETE CASCADE,
  25. CONSTRAINT PremiumFK REFERENCES PREMIUM(`id`)
  26.         ON DELETE CASCADE,
  27. CONSTRAINT ReprintFK REFERENCES REPRINTS(`id`)
  28.         ON DELETE CASCADE
  29. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement