Here is the problem:
We have 3 tables (MS SQL 2008 R2):
Table 1 FILMS (table with films)
Table 2 Songs (table with songs)
Table 3 Titles
Since “Films” and “Songs” can contain more than one title (I have many titles on different languages), I want to keep all of the titles in the separate table “Titles”. Primary keys in tables Films and Songs are based on [int] identity specification with increment +1.
So for example: we can have a film and song with ID=3.
How can I join table “Titles” with “Films” and “Songs”?
P.S. I tried to create unique keys by adding a new column [idKey] with formula to FILMS an SONGS
for Films it was (CONVERT([nvarchar](10),[ID],(0))+'f')
for Songs it was (CONVERT([nvarchar](10),[ID],(0))+'s')
where [ID] is their identity specification
But I wasn’t able to mark this column as a primary key
even if you don’t have foreign key constrain in between this three table, you get the the data by joining three table.
the point is at-least two table should have a general column