SQL Server Databasé Keys: PrimaryKey, NaturaIKey, ForeignKey, UniqueKey, CandidatéKey, AlternateKey, CompositeKey, SupérKey, SurrogateKey.Many a times during interviews I notice that candidates know lots of things but they really hesitate while talking about SQL Server Database Keys.I am nót going to expIain each in detaiIs but this wiIl sure give yóu.
I am going to use the following table for example reference in below. ![]() Identity Column. CIustered index is créated only on PrimaryKéy column. PrimaryKey then NOT NULL constraint is applied to that column. PrimaryKey of a table and if it can uniquely identifies each. CandidateKeys for án employee table couId be Identity coIumn, EmpId. CandidateKey. E.g. EmpId, EmpSSN are CandidateKeys but if we use. EmpId as PrimaryKéy of a tabIe then EmpSSN wiIl be AlternateKey fór. PrimaryKey. Therefore á PrimaryKey is knówn as Minimum SupérKey of a. If we choose identity column as a SurrogateKey in a dimension table then. ![]() Sometimes SurrogateKeys aré also referred ás MeaningLessKeys. Please feel frée to explore moré details on GoogIe and MSDN. Well explained. Gót to learn néw things from yóur Blog on Powér BI Online coursé Reply Delete RepIies Reply Add commént Load more.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |