Menu
News
All News
Dungeons & Dragons
Level Up: Advanced 5th Edition
Pathfinder
Starfinder
Warhammer
2d20 System
Year Zero Engine
Industry News
Reviews
Dragon Reflections
White Dwarf Reflections
Columns
Weekly Digests
Weekly News Digest
Freebies, Sales & Bundles
RPG Print News
RPG Crowdfunding News
Game Content
ENterplanetary DimENsions
Mythological Figures
Opinion
Worlds of Design
Peregrine's Nest
RPG Evolution
Other Columns
From the Freelancing Frontline
Monster ENcyclopedia
WotC/TSR Alumni Look Back
4 Hours w/RSD (Ryan Dancey)
The Road to 3E (Jonathan Tweet)
Greenwood's Realms (Ed Greenwood)
Drawmij's TSR (Jim Ward)
Community
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions, OSR, & D&D Variants
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Resources
Wiki
Pages
Latest activity
Media
New media
New comments
Search media
Downloads
Latest reviews
Search resources
EN Publishing
Store
EN5ider
Adventures in ZEITGEIST
Awfully Cheerful Engine
What's OLD is NEW
Judge Dredd & The Worlds Of 2000AD
War of the Burning Sky
Level Up: Advanced 5E
Events & Releases
Upcoming Events
Private Events
Featured Events
Socials!
EN Publishing
Twitter
BlueSky
Facebook
Instagram
EN World
BlueSky
YouTube
Facebook
Twitter
Twitch
Podcast
Features
Top 5 RPGs Compiled Charts 2004-Present
Adventure Game Industry Market Research Summary (RPGs) V1.0
Ryan Dancey: Acquiring TSR
Q&A With Gary Gygax
D&D Rules FAQs
TSR, WotC, & Paizo: A Comparative History
D&D Pronunciation Guide
Million Dollar TTRPG Kickstarters
Tabletop RPG Podcast Hall of Fame
Eric Noah's Unofficial D&D 3rd Edition News
D&D in the Mainstream
D&D & RPG History
About Morrus
Log in
Register
What's new
Search
Search
Search titles only
By:
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions, OSR, & D&D Variants
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Menu
Log in
Register
Install the app
Install
Upgrade your account to a Community Supporter account and remove most of the site ads.
Community
General Tabletop Discussion
*Geek Talk & Media
SRD Spells Database 3.5
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="javapadawan" data-source="post: 1120054" data-attributes="member: 1444"><p>Oooo, data modeling! Can I play? <img src="https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png" class="smilie smilie--emoji" loading="lazy" width="64" height="64" alt=":)" title="Smile :)" data-smilie="1"data-shortname=":)" /></p><p></p><p>I've been working on a new model for the data in my spell database, primarily because at first I had all the spell data denormalized into one table, with a setup much like The Dood's, but I now want to add a feature to my program that sorts by spell level, and also allows for adding custom descriptors, domains, classes, etc.</p><p></p><p>What I have thus far looks like this, and I'd love to hear any comments or suggestions. Additionally, if you like this design at all, please feel free to use or improve upon it for yourself:</p><p></p><p>spell</p><p>-----</p><p>spell_id (AutoNumber)</p><p>name (Text)</p><p>components (Text)</p><p>casting_time (Text)</p><p>spell_range (Text)</p><p>effect_type (Text)</p><p>effect (Text)</p><p>duration (Text)</p><p>saving_throw (Text)</p><p>spell_resistance (Text)</p><p>short_desc (Memo)</p><p>long_desc (Memo)</p><p></p><p>*I separated effect type from effect hoping to make searching for spells which have a Target as opposed to Area effect spells easier.</p><p></p><p>attribute_type</p><p>--------------</p><p>attribute_type_id (Number)</p><p>attribute_type (Text)</p><p></p><p>*Examples of attribute types would be: School, Subschool, Descriptor, Class, Domain, Source. ID is not AutoNumber since these aren't created on the fly and can be used as constants for grouping attributes.</p><p></p><p>attribute</p><p>---------</p><p>attribute_id (AutoNumber)</p><p>attribute_type_id (Number, foreign key: attribute_type)</p><p>attribute (Text)</p><p>information (Memo, nullable)</p><p>abbrev (Text, nullable)</p><p></p><p>*So, for example, this is where I'd list all the spell Schools (Conjuration, Abjuration, etc.) with an attribute_type_id matching that of the School attribute_type. The information field is for holding miscellaneous data, like granted powers for the domains. The abbrev field is what is sounds like it is, so for example, the attribute Sorcerer/Wizard (attribute_type Class) would have Sor/Wiz in it's abbrev field.</p><p></p><p>spell_has_attribute</p><p>-------------------</p><p>spell_has_attribute_id (AutoNumber)</p><p>attribute_type_id (Number, foreign key: attribute_type)</p><p>attribute_id (Number, foreign key: attribute)</p><p>spell_id (Number, foreign key: spell)</p><p>value (Number)</p><p></p><p>*This table, then, is what ties the attribute to a particular spell, and each spell may have none, one, or many of any particular attribute type. The value field can hold the actual spell level. </p><p></p><p>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.</p><p></p><p>I'm still on the fence about whether or not component types, like material, verbal, XP, etc., should be attributes rather than plain text. Anyway, if you read this far, thanks, and I'd welcome any feedback, even if it questions my sanity. <img src="https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png" class="smilie smilie--emoji" loading="lazy" width="64" height="64" alt=":)" title="Smile :)" data-smilie="1"data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="javapadawan, post: 1120054, member: 1444"] Oooo, data modeling! Can I play? :) I've been working on a new model for the data in my spell database, primarily because at first I had all the spell data denormalized into one table, with a setup much like The Dood's, but I now want to add a feature to my program that sorts by spell level, and also allows for adding custom descriptors, domains, classes, etc. What I have thus far looks like this, and I'd love to hear any comments or suggestions. Additionally, if you like this design at all, please feel free to use or improve upon it for yourself: spell ----- spell_id (AutoNumber) name (Text) components (Text) casting_time (Text) spell_range (Text) effect_type (Text) effect (Text) duration (Text) saving_throw (Text) spell_resistance (Text) short_desc (Memo) long_desc (Memo) *I separated effect type from effect hoping to make searching for spells which have a Target as opposed to Area effect spells easier. attribute_type -------------- attribute_type_id (Number) attribute_type (Text) *Examples of attribute types would be: School, Subschool, Descriptor, Class, Domain, Source. ID is not AutoNumber since these aren't created on the fly and can be used as constants for grouping attributes. attribute --------- attribute_id (AutoNumber) attribute_type_id (Number, foreign key: attribute_type) attribute (Text) information (Memo, nullable) abbrev (Text, nullable) *So, for example, this is where I'd list all the spell Schools (Conjuration, Abjuration, etc.) with an attribute_type_id matching that of the School attribute_type. The information field is for holding miscellaneous data, like granted powers for the domains. The abbrev field is what is sounds like it is, so for example, the attribute Sorcerer/Wizard (attribute_type Class) would have Sor/Wiz in it's abbrev field. spell_has_attribute ------------------- spell_has_attribute_id (AutoNumber) attribute_type_id (Number, foreign key: attribute_type) attribute_id (Number, foreign key: attribute) spell_id (Number, foreign key: spell) value (Number) *This table, then, is what ties the attribute to a particular spell, and each spell may have none, one, or many of any particular attribute type. The value field can hold the actual spell level. 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. I'm still on the fence about whether or not component types, like material, verbal, XP, etc., should be attributes rather than plain text. Anyway, if you read this far, thanks, and I'd welcome any feedback, even if it questions my sanity. :) [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
*Geek Talk & Media
SRD Spells Database 3.5
Top