Mike J Posted August 8, 2008 Posted August 8, 2008 Hey all, I reviewed Matt Petrosky's file sometime ago using relationships that created records within the same table that allowed him to create a hierarchy that can then be expanded with some scritpting to give the UI a sense of expanding folders. I also looked at Seedcodes unlocked version with similar structure. Unfortunately my solution requires separation of the entities due to drastic differences in there attributes. Since the two examples both use creating records in a single table...is it possible to create a similar structure using separate tables? Thanks Mike
corn Posted August 8, 2008 Posted August 8, 2008 Portals can only include records from a single table to represent a row. Your solution doesn't "require" different tables, that's a choice we make as developers. Given that you want to show these drastically different records in a single hierarchical view, it's likely you have a generalization/specialization pattern which can be implemented by a single table with null columns, as multiple tables with duplicate columns, or as subtyped tables where common attributes are in a single table and distinct attributes in one or more separate tables. In the first and third implementations of the pattern you can easily create your hierarchical portal - not so easy with the second (which is what it sounds like you have).
comment Posted August 8, 2008 Posted August 8, 2008 I agree with what Corn said (after reading it three times to understand it... : ). However, if your entities are so drastically different, then you cannot possibly have a flexible hierarchy (where an item can be have an arbitrary number of ancestors). You must have a rigid hierarchy structure, with a fixed number of levels. Hierarchical portals are designed to deal with flexible (recursive) hierarchy. Though they COULD be used for rigid hierarchy too, there might be a more suitable way to present this information, e.g. as a series of portals.
Recommended Posts
This topic is 6010 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now