Quantcast
Channel: Defining a one-to-one relationship in SQL Server - Stack Overflow
Browsing latest articles
Browse All 7 View Live

Answer by Assaf S. for Defining a one-to-one relationship in SQL Server

In my opinion, a better solution for not reading the BLOB with the LINQ query would be to create a view on the table that contains all the column except for the BLOB ones.You can then create an EF...

View Article



Answer by JohnnyBizzle for Defining a one-to-one relationship in SQL Server

How about this. Link the primary key in the first table to the primary key in the second table.Tab1.ID (PK) <-> Tab2.ID (PK)My problem was I have a 2 stage process with mandatory fields in both....

View Article

Answer by DenNukem for Defining a one-to-one relationship in SQL Server

Put 1:1 related items into the same row in the same table. That's where "relation" in "relational database" comes from - related things go into the same row.If you want to reduce size of data traveling...

View Article

Image may be NSFW.
Clik here to view.

Answer by Damir Sudarevic for Defining a one-to-one relationship in SQL Server

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:CREATE TABLE...

View Article

Answer by Tamil.SQL for Defining a one-to-one relationship in SQL Server

there is no such thing as an explicit one-to-one relationship.But, by the fact that tbl1.id and tbl2.id are primary keys and tbl2.id is a foreign key referenceing tbl1.id, you have created an implicit...

View Article


Answer by Myles for Defining a one-to-one relationship in SQL Server

Why not make the foreign key of each table unique?

View Article

Defining a one-to-one relationship in SQL Server

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...

View Article
Browsing latest articles
Browse All 7 View Live


Latest Images