[Tfug] "Ordering" tuples in a table

Dave Thompson dthomp325 at gmail.com
Tue Oct 20 09:23:49 MST 2009


>
> Yes.  I can prevent the data from being inserted (modified, etc.)
> without the required references existing.  What I am trying to
> get at is how do I force the *user* to always present data to the
> RDBMS in an order that follows these rules?
>
> E.g., if you were typing in parent/child information, you
> wouldn't intuitively *know* that you have to enter parent
> data before child data.  That's a consequence of the way the
> data has been reprsented (implementation issue).
>
> So, what I do is create a new entry for "mom" *if* you give
> me data for her as "child's" parent -- and then *hope* you
> come around to eventually filling in the details of *that*
> record at a later time.  (the way I do it currently is
> pretty involved since I need to note those records that
> were artificially created so that they aren't persistent
> *if* you happen to create yet another "new" record to replace
> it)
>

It sounds like your problem may be more on the user interface side of things
then?

Why not add an 'Add Child' button to the 'Person' record view. Then when the
user clicks the 'Add Child' button the child record is created with the
parent reference properly populated. You could also have a 'Set Parent'
button to associate a child with it's parent after record
creation/persistence has already happened.

-Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tfug.org/pipermail/tfug_tfug.org/attachments/20091020/ec5611c3/attachment-0002.html>


More information about the tfug mailing list