I have a question concerning relations and whether my planned db-design agrees with Servoy...
Here's the setup of my tables (simplified):
- client (client_id, name,...)
- client_addition (client_id, add_id, val)
- code_addition (add_id, name, format)
As an example i can have the following entries:
- client
client_id = 1, name = 'Joe'
- client_add
client_id = 1, add_id = 1, val = '648-11-1234'
client_id = 1, add_id = 2, val = '12/06/1975'
- code_add
add_id = 1, name = 'Social Security Number', format = 'TEXT'
add_id = 2, name = 'Date of Birth', format = 'DATE'
In a tab on the form displaying client info i would like the following entry for Joe:
- Social Security Number: 648-11-1234
- Date of Birth: 12/06/1975'
This makes it easy to expand/adjust/customize the solution and can also be used for categories,... you just have to insert a new row into the code table.
While this denormalization is easy to handle with SQL, i'm not quite sure what the best approach would be in Servoy (as you can imagine, i'm new to Servoy). How flexible are relations? Is there a way to achive the resolution of the addition code with a lookup field?
Thanks for feedback,
Reto