Re: euEDB / euSQL primary key problem
- Posted by duke normandin <dnormandin at bsdrocksperlrolls.com> Feb 18, 2007
- 547 views
Matt Lewis wrote: > > duke normandin wrote: > > > > hey.... > > > > I need to have both keys in a 2-key table form a "composite" primary key. > > Can't seem to be able to convince euEDB to accept that scenario. Anybody > > know if this feature is supported in euEDB / euSQL ? > > > > Example: > > > > Students Table Participants Table Activities Table > > > > Name | ID* ID* | Activity* Activity* | Cost > > > > You see how the fields in the "Participants" table are really" foreign" > > keys that _together_ constitutes the table's unique key? TIA... > > You need to put ID and Activity into a sequence, and make that the key. > For eusql, you'd need to make them 'sub-fields.' > > PK.ID > PK.Activity > > Matt Thanks for clueing me in, Matt. I haven't gotten into *any* Euphoria /euSQL coding yet. I'm just fooling around with your "edb" widget. Very cool! Good way to brush up on my SQL as well! So, as I'm writing this, I'm also looking at the "table definition" tab for my "Participants" table. Am I correct in assuming that all I have to do is rename ID => PK.ID and ACTIVITY => PK.ACTIVITY _and_ click the Primary Key box for both? I'll try it at any rate, but I thought that I'd ask while I was thanking you for your reply. L8r... -- duke SW of Calgary - near the Rockies http://www.rootshell.be/~perlster/euphoria/