Pielorinho
Iron Fist of Pelor
I'm trying to wrap my brain around this; tell me if I'm misunderstanding what Acid Fog's records in spell_has_attribute would look likejavapadawan said:Oooo, data modeling! Can I play?
For example, Acid Fog would have one record in spell_has_attribute with an attribute_type_id matching that of the Class attribute_type, whose attribute_id would match that of the Sorcerer/Wizard attribute, and whose value would be 6 (the level a Sorcerer or Wizard could cast the Acid Fog spell at). Likewise, there would also be a record for that spell tying it to the Domain attribute_type and the Water attribute, with a value of 7.
spell_has_attribute_id
attribute_type_id
attribute_id
Spell_ID
value
01
[Descriptor]
[Acid]
[Acid Fog]
-
02
[Class]
[Sorc/Wiz]
[Acid Fog]
6
03
[Domain]
[Water]
[Acid Fog]
7
04
[Component]
[Verbal]
[Acid Fog]
-
05
[Component]
[Somatic]
[Acid Fog]
-
06
[Component]
[Arcane Material]
[Acid Fog]
A pinch of dried, powdered peas combined with powdered animal hoof
07
[Component]
[Divine Focus]
[Acid Fog]
-
(edit: dammit, my cool table didn't work! Anyway, I think you can read this, even if it's not as cool as I would've liked. Note that text in brackets would be replaced by numerical foreign keys pointing toward the appropriate primary keys in the appropriate tables, of course).
Is this how you're imagining it? Note that I changed "value" to a text field, to allow for material components to have a description there. This is probably a bad idea -- rarely do you need to sort by material component, so this is probably better left in the spell's main description -- but I wanted to throw it out there as an idea. (I also left out records for school, subschool, and source, since I think those belong in the spell's main record).
Daniel
Last edited: