Hello,On a database for a education web site I need to classify the Posts and Documents according to their Subjects, Grades and Themes. Later I might need extra classification.1) The standard way (3 base tables): Tables Subjects, Grades and Themes. These tables are related to Posts and Documents through tables PostsSubjects, ..., DocumentsGrades, ...2) A more flexible approach (2 base tables):Tables Groups and Tags.In Groups I might insert Subject, Theme and Grade, or any other classification type, and in Tags each group's tags.create table dbo.Groups( Id uniqueidentifier rowguidcol not null constraint DF_Groups_Iddefault (newid()), [Name] nvarchar(100) not null constraint U_Groups_Name unique, constraint PK_Groups primary key clustered (Id))create table dbo.Tags( Id uniqueidentifier rowguidcol not null constraint DF_Tags_Iddefault (newid()), GroupId uniqueidentifier not null, [Name] nvarchar(40) not null constraint U_Tags_Name unique, constraint PK_Tags primary key clustered (Id))
Then I would associate Posts and Documents to Tags using PostsTags and DocumentsTags.I might even apply this system to Users using UsersTags to define Users interests and being able to easily get a cross reference between Users interests and Posts and Documents.I am not sure if I should go (1) or (2).Now what would you do?Any comment or critic is welcome.Thank,Miguel