我有一份xml,老板要求拆解成数据库表结构大致的样子是:
Customer(Attribute1, Attribute2,Attribute3...ChildElement1,ChildElement2,ChildElement3...)
ChildElement1(Attribute1, Attribute2,Attribute3...)
ChildElement2(Attribute1, Attribute2,Attribute3...)
ChildElement3(Attribute1, Attribute2,Attribute3...)类似这样的嵌套结构,字段非常多,超过1000,请问表结构要怎样设计?是将Customer ChileElement1,2,3.。。尽量放在同一张表好(字段会非常多)还是分成几个表用外键相连,但这样的话Customer主表的外键会很多,另外ChildElement中也会含有别的外键。嵌套十分复杂。这样的话查询的时候是否很麻烦?
到底怎样设计好?