KeithG
AWF VIP
- Local time
- Today, 08:12
- Joined
- Mar 23, 2006
- Messages
- 2,592
I am creating a db at work that basically is a user interface to write a pass through query for our AS400. I save the query definitions to various tables so that it is stored an will be able to be modified. I have an elements table, a Criteria table, and a joins table (along with other tables that store the element and table information from AS400). I am having issues with storing the join information for the queries. The table schema is below
tbl_Query_Joins
JoinID
QueryID
ParentEntitityID
ChildEntityID
PE_AttributeID (Parent Entity Attribute ID)
CE_AttributeID (Child Entity Attribute ID)
This is my current structure for the joins table. But I am having problems joining more than two tables. Can anyone suggest a better schema for the joins table. I actually don't think this table is properly normalized because I feel like ParentEntityID and ChildEntityID along with PE_AttributeID and CE_AttributeID are a violation of first normal form. Would you agree?
With my current structure I was thinking I could use my JoinID from the first join as the parentEntityID for the second join. Any ideas.
tbl_Query_Joins
JoinID
QueryID
ParentEntitityID
ChildEntityID
PE_AttributeID (Parent Entity Attribute ID)
CE_AttributeID (Child Entity Attribute ID)
This is my current structure for the joins table. But I am having problems joining more than two tables. Can anyone suggest a better schema for the joins table. I actually don't think this table is properly normalized because I feel like ParentEntityID and ChildEntityID along with PE_AttributeID and CE_AttributeID are a violation of first normal form. Would you agree?
With my current structure I was thinking I could use my JoinID from the first join as the parentEntityID for the second join. Any ideas.
Last edited: