问题描述
我需要定义一对一的关系,但在 SQL Server 中似乎找不到正确的方法.
你问为什么是一对一的关系?
我使用 WCF 作为 DAL (Linq) 并且我有一个包含 BLOB 列的表.BLOB 几乎不会改变,每次进行查询时都将其传输过来会浪费带宽.
我查看了
I need to define a one-to-one relationship, and can't seem to find the proper way of doing it in SQL Server.
Why a one-to-one relationship you ask?
I am using WCF as a DAL (Linq) and I have a table containing a BLOB column. The BLOB hardly ever changes and it would be a waste of bandwidth to transfer it across every time a query is made.
I had a look at this solution, and though it seems like a great idea, I can just see Linq having a little hissy fit when trying to implement this approach.
Any ideas?
One-to-one is actually frequently used in super-type/subtype relationship. In the child table, the primary key also serves as the foreign key to the parent table. Here is an example:
这篇关于在 SQL Server 中定义一对一关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!