首页 新闻 赞助 找找看

如何存储同一级对象中多对多的关系

0
悬赏园豆:50 解决于 2013-11-19 16:14

1 数据模型

论文与论文之间存在引用于被引用的关系,引用与被引是相对的,相互之间是多对多的关系。暂时想着使用两个列表来存储,Reference表示该论文引用其他的论文,Cited表示该论文被哪些论文引用了。

public class Paper
{
    public string Title { set; get; }
    public string Issn { set; get; }
    public string Source { set; get; }
    public List<Paper> Reference { set; get; }
    public List<Paper> Cited { set; get; }

    public Paper()
    {
        Reference = new List<Paper>();
        Cited = new List<Paper>();
    }

2 需求

有100W的论文对象,要实现论文对象的保存与初始化,以及查询数据对象,查询需要根据引文关系。想了很久感觉没有思路,使用什么样的数据模型保存和才去什么方法查询?不知道ORM或者Enity Framework code first 能不能弄?

陈福佑的主页 陈福佑 | 初学一级 | 园豆:41
提问于:2013-11-13 17:13
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册