How to implement multi relationship in MS SQL?

Posted by Ethan on Stack Overflow See other posts from Stack Overflow or by Ethan
Published on 2010-12-27T05:50:37Z Indexed on 2010/12/27 5:53 UTC
Read the original article Hit count: 329

I’m trying to design a database to use with ASP.net MVC application. Here is the scenario: There are three entities and users can post their comments for each of these different entities. I just wonder how just put one table for Comments and link all other entities to it. Obviously, Comments table needs 3 references (foreign key) to those tables but as you know these foreign keys can’t be null and just one of them can be filled for each row. Is there any better way than implementing three different tables for each entity’s comments? Cheers Ethan

© Stack Overflow or respective owner

Related posts about sql

Related posts about foreign-keys