Converting JSON to a MySQL table, how should the table structure look like? -


the following json file...

{     "name":"magic 2014 core set",     "code":"m14",     "releasedate":"2013-07-19",     "border":"black",     "type":"core",     "cards":     [         {             "layout":"normal",             "type":"creature - human warrior",             "types":["creature"],             "colors":["red"],             "multiverseid":370735,             "name":"academy raider",             "subtypes":["human","warrior"],             "cmc":3,             "rarity":"common",             "artist":"karl kopinski",             "power":"1",             "toughness":"1",             "manacost":"{2}{r}",             "text":"intimidate (this creature can't blocked except artifact creatures and/or creatures share color it.)\n\nwhenever academy raider deals combat damage player, may discard card. if do, draw card.",             "number":"124",             "imagename":"academy raider"         },         {             "layout":"normal",             "type":"artifact - equipment",             "types":["artifact"],             "colors":[],             "multiverseid":370581,             "name":"accorder's shield",             "subtypes":["equipment"],             "cmc":0,             "rarity":"uncommon",             "artist":"alan pollack",             "manacost":"{0}",             "text":"equipped creature gets +0/+3 , has vigilance. (attacking doesn't cause tap.)\n\nequip {3} ({3}: attach target creature control. equip sorcery.)",             "flavor":"an auriok shield polished mirror finish on inside, enabling bearer watch foes ahead , behind.",             "number":"204",             "imagename":"accorder's shield"         },         {             "layout":"normal",             "type":"creature - spirit",             "types":["creature"],             "colors":["black"],             "multiverseid":370811,             "name":"accursed spirit",             "subtypes":["spirit"],             "cmc":4,             "rarity":"common",             "artist":"kev walker",             "power":"3",             "toughness":"2",             "manacost":"{3}{b}",             "text":"intimidate (this creature can't blocked except artifact creatures and/or creatures share color it.)",             "flavor":"many have heard slither of dragging armor , soft squelch of voice. victims ever meet icy gaze.",             "number":"83",             "imagename":"accursed spirit"         },         {...},         {...},         {...},     ] } 

the cards data think in single table i'm not sure how the...

"name":"magic 2014 core set", "code":"m14", "releasedate":"2013-07-19", "border":"black", "type":"core", 

would associated card data. how should design mysql table(s) easy , efficient access?

mysql relational database. means solution come need include primary key, foreign key , normalization. here simple tutorial show do. have fun!

http://www.dreamincode.net/forums/topic/179103-relational-database-design-normalization/


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -