Sorry I forget to mention another column in the second table 'ObjectDescription' :
table_name
object_id
language_id
description
and the data in ObjectDescription is like this :
table_name, object_id, language_id, description
--------------------------------------------------------
FREQUENCY, 1, 1, Weekly Transmission
FREQUENCY, 1, 2, Weekly Transmission (in French)
FREQUENCY, 1, 3, Weekly Transmission (in Spanish)
the query to get the complete Frequency is :
declare @v_Language int
set @v_Language = 1
SELECT f.frequency_id, f.frequency_name, od.description
FROM frequency f, objectdescription od
WHERE f.frequency_id = od.object_id
and od.table_name = 'FREQUENCY'
and f.language_id = @v_Language
Normal users can only read/query these tables. So if a normal user A login for English then he will see only the English Description;
A Super user can update these tables. So a super user B can see and update English/French/Spanish translations.
I am going to use a DAO Layer. So I was thinking about the best design for these classes. Any input?
Thanks
|