Re: [Refdb-devel] xnote links
Status: Beta
Brought to you by:
mhoenicka
From: Damien J. D. <D.J...@cs...> - 2006-08-16 11:38:52
|
Gidday gidday Sorry if I'm a bit obscure. I'll try and clarify what I meant. By non-directional links (at a user interface level) I meant only that if I link note A to note B then note B would automatically be linked to note A. A directional link would be that if I link note A to note B then when I query note B I don't get back any reference to note A. At an implemention level non-directionality means that rather than having note A "link to" note B and, conversely, having note B "linked from" note A, you would have note A "link to and linked from" note B. This would involve an extra table. Now, you can have non-directional links at a user interface level but not at the implementation level. If this was the approach, you would need two distinct query processes, finding all those notes linking to your current note and finding all the notes linked from your current note, and then exclude any duplicates. Which is fine, if you're okay with a bit of potential duplication in your DB and/or manual constraint enforcement. I guess I'm just being a pedantic relational purist here (wherein the relational DB enforces this kind of constraint rather than the app). It also depends on what behaviour we want - I really don't care which we get at the user level and it only seems that directional links are easier to implement without adding in, either extra database redundancy management code as discussed in the previous paragraph, or a new table. Anyway, I shouldn't argue with you on the implementation details! I'm just happy that you're considering putting the feature in! Peace Damien Markus Hoenicka wrote: > Hi Damien, > > probably I'm a bit dense here, but I think that links via the t_xnote > table are bidirectional by nature. It is just a matter of the proper > query. We've got the same issue with the t_refdb, t_author, and > t_xauthor tables. I can start with a name and find all > references in t_refdb that use that name as an author. I can also > start with a reference ID and retrieve all authors of this > reference. Speaking in terms of extended notes, "links to" and "is > linked from" should be pretty much the same story. Or am I missing > something here? > > regards, > Markus > > Damien Jade Duff writes: > > I think I know what you mean - you'd allow presumably a NOTE string in > > the xnote_type field of the t_xnote table. Though I think that would > > only allow for unidirectional links unless you were happy to let your > > backend try to keep two links updated (I believe this is sort of frowned > > upon in the relational DB world) or to search two indices, note_id and > > xref_id for a particular note_id (maybe okay but seems clumsy). > > > > I could handle non-directional links outside of RefDB by automatically > > generating dummy references to group notes with but it's kind of messy, > > particularly as there's no real reason to group notes in groups bigger > > than 2 (since you could then group notes by linking them all to another, > > group note, anyway). > > > > On the other hand, while non-directional links would be nice, > > unidirectional links would be just fine as far as I'm concerned. It > > would be up to the DB user to specify if he/she wanted a link going both > > ways. > > > > As far as a GUI tree view on the data is concerned, well it may recurse > > sometimes, but that's just a consequence of choosing a tree to view a > > potentially cyclic directed (or undirected) graph. > > > > Feel free to talk me out of it! > > > > Peace > > Damien > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share your > > opinions on IT & business topics through brief surveys -- and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > Refdb-devel mailing list > > Ref...@li... > > https://lists.sourceforge.net/lists/listinfo/refdb-devel > > > |