sql server primary key/table design
Posted on 2016-09-06
I am unsure how to create my table.
I have a table that exists already and stores client words.
the client data could change over the course of time, thus introducing new words. I thought I would create a new table where i could store the words once i had grouped them along with the datetime. so when the word client db changes with new data my grouped list of words would be different. then I would do some other action.
I have this
CREATE TABLE TblCurrentWords
Word_ID nvarchar(MAX) NOT NULL PRIMARY KEY,
Datetime * not sure how to make this field
is it permissible to make the primary key a composite of word+datetime, if so how, how do i use datetime in field datetime.
if this is possible then I will always have a list of the last list of words and can then identify the new words. if its a bad design then what would be better.