In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
What are the attributes in the candidate code? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.
The attribute in the candidate code is called: primary attribute. If the value of an attribute or attribute group in a relationship can uniquely identify a tuple, and any subset of it can no longer be identified, the attribute group is called a (supercode) candidate code; when a relationship has N attributes or attribute groups that can be uniquely identified, it means that there are N candidate codes in the relationship, and one of them can be selected as the main code.
The attribute in the candidate code is called: primary attribute.
If the value of an attribute or attribute group in a relationship can uniquely identify a tuple, and any of its subsets can no longer be identified, the attribute group is called a (supercode) candidate code.
For example, in the student entity, the "student number" is the only one that can distinguish the student entity, and at the same time, assuming that the attribute combination of "name" and "class" is enough to distinguish the student entity, then {student number} and {name, class} are all candidate codes.
In a nutshell, a candidate code (supercode) is an attribute or group of attributes that can be selected as a master code. When a relationship has N attributes or attribute groups that can be uniquely identified, it means that the relationship has N candidate codes, and one of them can be selected as the master code.
Attributes that have appeared in candidate codes are called primary attributes; non-primary attributes are attributes that are not included in any candidate code.
For example: relationship workers (job number, ID number, name, gender, department). Obviously, both the job number and the ID number can uniquely indicate this relationship, so they are both candidate codes. The two attributes of work number and ID card number are the main attributes. If the master code is an attribute group, then all the attributes in the attribute group are primary attributes.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.