本文介绍了有关IDENTITY列的帮助.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!
我正在尝试在复合主键中使用IDENTITY列...假设我有一个关系

    Artists(#ArtistID,Artist Name)

和另一个关系

   曲目(#TrackID,#ArtistID,曲目名称,流派)

我认为由于身份列的关系,每个艺术家都有很多曲目"的关系将是正确的...

#TrackID即使与#ArtistID结合使用也始终是唯一的,因此每个艺术家都有很多曲目",但不是每个艺术家都可以遇到每个曲目"
(如果#TrackID不是"IDENTITY"列),那是错误的,对吧?
它仅有助于在一侧建立关系..每个艺术家都有许多足迹,但每个轨迹只能在一个艺术家中得到满足"

请解释

Hi everyone !
I''m trying to get the sense of using IDENTITY columns in composite primary key... Suppose I have a relation

    Artists(#ArtistID,Artist Name)

and another relation

    Tracks(#TrackID, #ArtistID, Track Name, Genre)

I think that due to identity columns the relation "Each artist has many tracks" would be right...

#TrackID is always unique even in combination with #ArtistID, so "each Artist has many tracks", but not "each track could be met in many artists"
(if #TrackID wasn''t IDENTITY column) - that would be wrong, right????

it helps to build a relation in one side only .."EACH ARTIST HAS MANY TRACKS, BUT EACH TRACK COULD BE MET ONLY IN ONE ARTIST"

explain please

推荐答案



这篇关于有关IDENTITY列的帮助.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 18:55