blissland Posted November 2, 2008 Posted November 2, 2008 If I have table x related to table y which is related to table z and I'm looking at these 2 relationships within the relationship graph, i have two separate opportunities to SORT table Y by some criteria. If I want table y to be sorted, does it matter which relationship specifies this, and if so, what's the difference? Assume that x is a parent to y and y is a parent to z (if that matters). Related to this question, I have a table that is sorts records by ID descending. So am I correct in assuming that 'previous/next record' commands in the scripts will work with that descending order and thus not operate chronologically? in other words, prev/next does not refer to older/newer as it would if sorted ascending. ?
comment Posted November 2, 2008 Posted November 2, 2008 I am afraid you have a fundamental misconception here: the sort order defined for a relationship affects the relationship only. It determines the order in which records from the specified TO will be sorted, when accessed through that relationship. This has nothing to do with the sort order of the same records, when accessed directly through a layout of that table. Which record happens to be previous/next depends solely on the sort order of the found set.
blissland Posted November 2, 2008 Author Posted November 2, 2008 i see. thanks for clarifying. am i correct that sort is only meaningful in those relationships 1. for either table if the relationship is many-many or 2. for the daughter table if one-many Its not meaningful for a parent table.
comment Posted November 2, 2008 Posted November 2, 2008 Basically, that's correct. But it can get a bit more complex than that: the sort order of the parent may make no difference to the child (it has only one parent) - but it can be very significant to other TO's down the line that access the parent records through the child (for example, when the child is a join table).
Recommended Posts
This topic is 5924 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