Superkey

In the relational data model a superkey is any set of attributes that uniquely identifies each tuple of a relation.[1][2] Because superkey values are unique, tuples with the same superkey value must also have the same non-key attribute values. That is, non-key attributes are functionally dependent on the superkey.

The set of all attributes is always a superkey (the trivial superkey). Tuples in a relation are by definition unique, with duplicates removed after each operation, so the set of all attributes is always uniquely valued for every tuple. A candidate key (or minimal superkey) is a superkey that can't be reduced to a simpler superkey by removing an attribute.[3]

For example, in an employee schema with attributes employeeID, name, job, and departmentID, if employeeID values are unique then employeeID combined with any or all of the other attributes can uniquely identify tuples in the table. Each combination, {employeeID}, {employeeID, name}, {employeeID, name, job}, and so on is a superkey. {employeeID} is a candidate key, since no subset of its attributes is also a superkey. {employeeID, name, job, departmentID} is the trivial superkey.

If attribute set K is a superkey of relation R, then at all times it is the case that the projection of R over K has the same cardinality as R itself.

Example

English Monarchs
Monarch Name Monarch Number Royal House
Edward II Plantagenet
Edward III Plantagenet
Richard III Plantagenet
Henry IV Lancaster

First, list out all the sets of attributes:

• {}
• {Monarch Name}  
• {Monarch Number}  
• {Royal House}
• {Monarch Name, Monarch Number}
• {Monarch Name, Royal House}
• {Monarch Number, Royal House}
• {Monarch Name, Monarch Number, Royal House}

Second, eliminate all the sets which do not meet superkey's requirement. For example, {Monarch Name, Royal House} cannot be a superkey because for the same attribute values (Edward, Plantagenet), there are two distinct tuples:

  • (Edward, II, Plantagenet)
  • (Edward, III, Plantagenet)

Finally, after elimination, the remaining sets of attributes are the only possible superkeys in this example:

  • {Monarch Name, Monarch Number} — this is also the candidate key
  • {Monarch Name, Monarch Number, Royal House}

In reality, superkeys cannot be determined simply by examining one set of tuples in a relation. A superkey defines a functional dependency constraint of a relation schema which must hold for all possible instance relations of that relation schema.

See also

References

  1. ^ Date, Christopher (2015). "Codd's First Relational Papers: A Critical Analysis" (PDF). warwick.ac.uk. Retrieved 2020-01-04. Note that the extract allows a "relation" to have any number of primary keys, and moreover that such keys are allowed to be "redundant" (better: reducible). In other words, what the paper calls a primary key is what later (and better) became known as a superkey, and what the paper calls a nonredundant (better: irreducible) primary key is what later became known as a candidate key or (better) just a "key".
  2. ^ Introduction to Database Management Systems. Tata McGraw-Hill. 2005. p. 77. ISBN 9780070591196. no two tuples in any legal relation
  3. ^ Saiedian, H. (1996-02-01). "An Efficient Algorithm to Compute the Candidate Keys of a Relational Database Schema". The Computer Journal. 39 (2): 124–132. doi:10.1093/comjnl/39.2.124. ISSN 0010-4620.

Further reading

  • Silberschatz, Abraham (2011). Database System Concepts (6th ed.). McGraw-Hill. pp. 45–46. ISBN 978-0-07-352332-3.

Read other articles:

French American beauty company This article is about the beauty company. For other uses, see Coty (disambiguation). Coty Inc.The company's logoCompany typePublicTraded asNYSE: COTY (Class A)Euronext Paris: COTYS&P 400 componentISINUS2220702037IndustryBeautyFounded1904; 120 years ago (1904) in Paris, FranceFounderFrançois CotyHeadquartersAmsterdam, 1082 VA, NetherlandsArea servedWorldwideKey peoplePeter Harf (Exec Chairman)Sue Nabi (CEO)Products Cosmetics fragr...

 

Collobrative design at point called for two rovers being delivered at once that would explore Mars together. In 2010 there was the idea to these into one larger 600 kg rover.[1] The Mars Exploration Joint Initiative (MEJI) is an agreement signed between United States' space agency, NASA, and Europe's space agency, ESA to join resources and expertise in order to continue the exploration of the planet Mars.[2] The agreement was signed in Washington D.C. in October 2009, between ...

 

Drs.JasmanM.M Penjabat Wali Kota PayakumbuhPetahanaMulai menjabat 29 September 2023 PendahuluRida AnandaPenggantiPetahana Informasi pribadiLahir1 Januari 1968 (umur 56)Kota Payakumbuh, Sumatera Barat, IndonesiaSuami/istriNy. Lasta JasmanAlma materAPDN BukittinggiIIP JakartaUPI YPTK PadangPekerjaanPegawai Negeri SipilSunting kotak info • L • B Drs. Jasman, M.M gelar Datuak Bandaro Bendang atau juga dikenal dengan nama Jasman Rizal (lahir 1 Januari 1968)[1] adalah...

Village and municipality in Slovakia Košice-okolie District in the Kosice Region Kokšov-Bakša (Slovak pronunciation: [ˈkɔkʂɔw ˈbakʂa];is a village and municipality in Košice-okolie District in the Kosice Region of eastern Slovakia. History Historically, the village was first mentioned in 1262. Geography The village lies at an altitude of 190 metres (620 ft) and covers an area of 3.567 square kilometres (1.377 sq mi). It has a population of about 1050 people. G...

 

Agon Mehmeti Mehmeti con la maglia del Malmö FF nel 2010 Nazionalità  Svezia Albania (dal 2013) Altezza 184 cm Peso 76 kg Calcio Ruolo Attaccante Termine carriera 2022 Carriera Giovanili ????-2002 IFK Malmö2002-2008 Malmö FF Squadre di club1 2008-2011 Malmö FF88 (24)2012 Palermo3 (0)2012-2013→  Novara22 (6)[1]2013-2014→  Olhanense20 (2)2014-2015 Malmö FF25 (4)2016 Stabæk24 (4)2017 Gençlerbirliği1 (0)2017-2018 Ox...

 

Galaxy in the constellation of Virgo NGC 4482SDSS image of NGC 4482.Observation data (J2000 epoch)ConstellationVirgoRight ascension12h 30m 10.3s[1]Declination10° 46′ 46″[1]Redshift0.006241/1871 km/s[1]Distance58.7 Mly[2]Group or clusterVirgo ClusterApparent magnitude (V)13.9[1]CharacteristicsTypedE5[1]Size~30,450 ly (estimated)[1]Apparent size (V)1.41 x 0.84[1]Other designationsIC 3427, CGCG 7...

Pensionnat catholique de Fort George École des Pères Oblats, Fort George, janvier 1946. Histoire et statut Nom original Sainte-Thérèse-de-l’Enfant-Jésus Fondation 1930 (officialisé en 1937) Dissolution 1978 (officialisé en 1981) Type Pensionnats pour Autochtones au Canada Administration Localisation Ville Fort George Pays Canada Données clés modifier Le pensionnat catholique de Fort George, aussi connu sous le nom Sainte-Thérèse-de-l’Enfant-Jésus puis de Résidence Couture, e...

 

AscensioneAutoreGiotto? Data1291-1295 circa Tecnicaaffresco Dimensioni500×400 cm UbicazioneBasilica superiore, Assisi L'Ascensione è un affresco (500x400 cm) attribuito al giovane Giotto, databile al 1291-1295 circa e situato nella fascia superiore della controfacciata della Basilica superiore di Assisi. Descrizione e stile La scena, nella lunetta sinistra, è danneggiata soprattutto nella parte centrale degli astanti che assistono all'ascensione di Gesù. Si vede un angelo che sovrast...

 

Сибирский горный козёл Научная классификация Домен:ЭукариотыЦарство:ЖивотныеПодцарство:ЭуметазоиБез ранга:Двусторонне-симметричныеБез ранга:ВторичноротыеТип:ХордовыеПодтип:ПозвоночныеИнфратип:ЧелюстноротыеНадкласс:ЧетвероногиеКлада:АмниотыКлада:СинапсидыКла�...

AsusTek Computer Quartier général d'Asus à New Taipei. Création 1989 Fondateurs T.H. TungTed HsuWayne HsiehM.T. Liao Personnages clés TH Tung, vice-président et fondateurTed Hsu, vice-président et fondateur Forme juridique Public Action LSE : ASKDTSE: 2357 Slogan In search of incredible (« À la recherche de l'incroyable ») Siège social District de Beitou (Taipei) Taïwan Direction Shu Pin Hu (Co-Chief Executive Officer & Director) Hsien Yueh Hsu (Co-Ch...

 

Madonna del BelvedereAutoreRaffaello Sanzio Data1506 TecnicaOlio su tavola Dimensioni113×88 cm UbicazioneKunsthistorisches Museum, Vienna Dettaglio La Madonna del Belvedere (o Madonna del Prato) è un dipinto olio su tavola (113x88 cm) di Raffaello Sanzio, datato 1506 e conservato nel Kunsthistorisches Museum di Vienna. La data M.D.VI. si trova sull'orlo dell'abito della Vergine. Indice 1 Storia 2 Descrizione e stile 3 Altre immagini 4 Bibliografia 5 Voci correlate 6 Altri progetti 7 Co...

 

Keuskupan Mackenzie–Fort SmithDioecesis Mackenziensis–Arcis SmithKatolik Gereja Bunda Kemenangan di InuvikLokasiNegaraKanadaProvinsi gerejawiGrouard-McLennanStatistikLuas1.523.400 km2 (588.200 sq mi)Populasi- Katolik28,540 (67.9%)InformasiDenominasiKatolik RomaRitusRitus RomaKatedralKatedral Santo YosefKepemimpinan kiniPausFransiskusUskupJon Hansen,C.Ss.R.EmeritusDenis CroteauSitus webwww.dioceseofmackenzie.com Keuskupan Mackenzie–Fort Smith (bahasa Latin&#...

Львівська обласна державна адміністрація (Львівська ОДА) Будівля Львівської Обласної Державної АдміністраціїЗагальна інформаціяКраїна  УкраїнаДата створення липень 1995Попередні відомства Представництво Президента України у Львівській областіШтаб-квартира 79008, м. ...

 

Bupati Rote NdaoLambang Kabupaten Rote NdaoPetahanaOder Maks Sombu (Pj.)sejak 14 Februari 2024KediamanRumah Jabatan Bupati Rote NdaoMasa jabatan5 tahunDibentuk2 Mei 2002Pejabat pertamaChristian Nehemia Dillak, S.H.Situs webhttps://rotendaokab.go.id Pemimpin Rote Ndao sebelum Otonomi Daerah Adapun para pejabat yang memimpin di Rote Ndao dari masa ke masa saat masih bergabung di Kabupaten induk, Kabupaten Kupang, dengan nomenklatur Koordinatorschap Rote Ndao maupun Pembantu Bupati Wilayah ...

 

River in Montana, United States Flathead RiverThe river near Perma, MontanaMap of the Flathead River, its tributary forks and downriver connection to the Columbia River via Clark Fork and the Pend Oreille RiverNative namentx̣ʷetkʷ (Kalispel-Pend d'Oreille)ntx̣ʷe (Kalispel-Pend d'Oreille)LocationCountryUnited States, CanadaStateMontanaProvinceBritish ColumbiaPhysical characteristicsSourceConfluence of North Fork and Middle Fork Flathead River • locationRocky...

この記事には複数の問題があります。改善やノートページでの議論にご協力ください。 出典がまったく示されていないか不十分です。内容に関する文献や情報源が必要です。(2021年1月) 脚注による出典や参考文献の参照が不十分です。脚注を追加してください。(2021年1月) 独自研究が含まれているおそれがあります。(2021年1月)出典検索?: 摂政 – ニュ...

 

Catholic television network in the Philippines Television channel TV MariaCountryPhilippinesBroadcast areaWorldwideHeadquartersManilaPhilippinesProgrammingLanguage(s)EnglishFilipinoPicture format720p (HDTV)OwnershipOwnerRoman Catholic Archdiocese of ManilaCatholic Bishops' Conference of the PhilippinesTV Maria Foundation Philippines, Inc.Sister channelsVeritas 846 Catholic Media NetworkHistoryLaunchedJanuary 1, 2006; 18 years ago (2006-01-01)(test broadcast)August 13, 2...

 

Brazilian fashion designer Zuzu AngelBornJune 5, 1921Curvelo, Minas Gerais, BrazilDiedApril 5, 1976(1976-04-05) (aged 54)Rio de Janeiro, BrazilCause of deathCar crash (possibly murdered)OccupationFashion designerSpouseNorman Angel JonesChildrenStuart Angel Jones Hildegard Angel For the film, see Zuzu Angel (film). SNI document on Stuart, 1971 Zuleika Angel Jones (June 5, 1921 – April 14, 1976), better known as Zuzu Angel, was a Brazilian fashion designer, who became famous for...

Japanese manga series Fungus and IronFirst tankōbon volume cover菌と鉄(Kin to Tetsu)GenreAdventure[1]Dark fantasy[2]Science fiction[1] MangaWritten byAyaka KatayamaPublished byKodanshaEnglish publisherNA: Kodansha USAMagazineBessatsu Shōnen MagazineDemographicShōnenOriginal runMarch 9, 2021 – presentVolumes5 Fungus and Iron (Japanese: 菌と鉄, Hepburn: Kin to Tetsu) is a Japanese manga series written and illustrated by Ayaka Katayama. It began seria...

 

For other uses, see Stonehall (disambiguation). Civil parish in Leinster, IrelandStonehall Tigh CloicheCivil parishStonehallLocation of Stonehall within County Westmeath in the Republic of IrelandCoordinates: 53°36′37″N 7°19′51″W / 53.61028°N 7.33083°W / 53.61028; -7.33083CountryIrelandProvinceLeinsterCountyCounty WestmeathIrish grid referenceN443625 Stonehall (Irish: Tigh Cloiche)[1] is a civil parish in County Westmeath, Ireland. It is located abo...