I am working on a simple three table project to get started with web
services. The first two tables are essentially string lookup tables,
and the third has foreign keys to the primary keys in the first two
tables. Here's the layout (more or less):
table color
int uid [pkey]
string color
table boxsize
int uid [pkey]
string boxsize
table box
int uid [pkey]
int cuid [fkey to color.uid]
int bsuid [fkey to boxsize.uid]
string serialnumber
So my service looks like this:
GetColor
UpdateColor
GetBoxsize
UpdateBoxsize
GetBox
UpdateBox
GetColor returns a dataset with one table in it and GetBoxsize returns
a dataset with one table in it. I just added GetBox, and because of
the foreign key relations, it has all three tables in it.
So in the web client I have access to:
color.color
boxsize.boxsize
box.color
box.boxsize
box.box
So, my question is: should I use box.color or color.color to access
color? I have been using color.color, but now I have access to
box.color, and thus I have a choice. Will the code function
differently based on the one I pick? If I change box.color,
box.boxsize, and box.box, then call UpdateBox, will all three tables
update correctly?