First, I want to say I'm not an SQL pro. Nested SELECT queries were new to me until mid-January.
Anyway, I'm looking to implement a system where I can create new objects by basing them on other ones and then change only the fields I want to change while maintaining the link to the parent for the other fields. That way, if I change something at the parent level, the changes automatically propagates to the children unless they have an explicit value for that field. Sort of like a prefab, but a prefab that can itself inherit another prefab, forming a sort of inheritance tree.
I've seen something like this being used in Blizzard's RTS map editors starting with Warcraft 3, and this is something I could use for my own projects since I deal with a lot of data.
I know how to implement this in C# and C++, but I'm not sure how to do it at the database level. I can see a table where a line having a NULL for a particular field means to look up the parent's properties (and if it's NULL for the parent, go see the parent's parent, and so on), but when I have things like a many-to-many or one-to-many relation, I'm not quite sure how to do it with a relational model. I want the children to be able to add items to a list of items, or to just replace the list.
Is a relational database suitable for storing this kind of data model, or should I use something else to serialize the data? I know that Blizzard uses XML to represent this so it half-answers this question.