bug-recutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-recutils] join basics. Want to extract records, driven from a l


From: Jose E. Marchesi
Subject: Re: [bug-recutils] join basics. Want to extract records, driven from a list of "last names".
Date: Sat, 17 Mar 2018 10:43:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

        %rec: foo
        %key: Id
    
        Id: Hardy
        zam: t
    
        Id: Walters
        zam: t
    
        %rec: bar
        %type: last_name rec foo
    
        last_name: hakjah
        first_name: ZZZ
    
        last_name: jhskjsh
        first_name:  hsksj
    
        last_name: jshkjsh
        first_name:  lsjskj
    
        last_name: Walters
        first_name: sam
    
        last_name: jhajh
        first_name:  klsjlk
    
        last_name: sjhksjh
        first_name:  LKJLKJLK
    
    These lines from above
        %type: last_name rec foo
        ...
        last_name_zam: t
    are interesting. I know it works, I do not entirely understand the design --
    I have only basic SQL exposure, so keep that in mind.  Any 
comments/clarifications
    appreciated.

So you have two record sets: foo and bar.  foo records have a primary
key, which is Id.

In bar's record descriptor you have a

%type: last_name rec foo

This mean that the fields last_name are supposed to contain references
to some record of type foo.  This is a foreign key.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]