Relationships question
Posted: Tue Apr 12, 2011 4:50 am
I'm a student and I am using Xataface for our big project and so far I am super impressed with what I have been able to get working! Thanks so much for a great program! I had a quick question about relationships though. Say I have 4 tables...
Patient(pat_id, Firstname, LastName,...)
Doctor(doc_id, Firstname,LastName,...)
FirstName(fn_id, fname)
LastName(ln_id, lname)
The Firstname and Lastname fields in Patient are foreign keys in my database to fn_id and ln_id. So, when I pull up the patient tab in xataface the Firstname and Lastname fields would have say, 1,1 in them since that would be the the first entries in each firstname and lastname tables. How would I relate them in Xataface so that when I pull up the patient table it would show the names associated with the id's instead of just the number? Is this possible? I appreciate the help in advance!
Patient(pat_id, Firstname, LastName,...)
Doctor(doc_id, Firstname,LastName,...)
FirstName(fn_id, fname)
LastName(ln_id, lname)
The Firstname and Lastname fields in Patient are foreign keys in my database to fn_id and ln_id. So, when I pull up the patient tab in xataface the Firstname and Lastname fields would have say, 1,1 in them since that would be the the first entries in each firstname and lastname tables. How would I relate them in Xataface so that when I pull up the patient table it would show the names associated with the id's instead of just the number? Is this possible? I appreciate the help in advance!