473,769 Members | 3,352 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Theoretical definition for the number of unique values?

Hi Everyone,
Here is a theoretical, and definition question for you.
In databases, we have:

Relation
a table with columns and rows

Attribute
a named column/field of a relation

Domain
a set of allowable values for one or more attributes

Tuple
a row of a relation

Degree
the number of attributes a relation contains
Number of fields in a table

Cardinality
the number of tuples/rows a relation contains

But!

What is the definition for the number of unique values in a field?

So, if you have 100 rows in a table, and the field is
the gender field, with only values of: Y, N.
You have 2 unique values.
What do we call this concept?
"the number of unique values in a column?"

Is there one?
Thanks a lot!

Apr 12 '07
11 3948
On 27 Apr 2007 17:52:00 -0700, hpuxrac <jo*********@sb cglobal.net>
wrote:
>On Apr 27, 8:21 pm, Lemming <thiswillbou... @bumblbee.demon .co.uk>
wrote:
>On 12 Apr 2007 18:23:07 -0700, sqlservernew... @yahoo.com wrote:


>I found out. It is called "COLUMN CARDINALITY"
>Sorry, no prizes.
>http://www.informatik.uni-trier.de/~...WhangVT90.html
>(1) obtaining the column cardinality (the number of unique values in a
column of a relation) and
(2) obtaining the join selectivity (the number of unique values in the
join column resulting from an unconditional join divided by the number
of unique join column values in the relation to Be joined).
>These two parameters are important statistics that are used in
relational query optimization and physical database design.
>http://www.idig.za.net/mysqlindexes/2006/11/09/
>Column cardinality. This is the number of unique values contained in a
column. Indexes work best when there is a high cardinality. Put
another way, the more unique values there are (fewer duplicates) the
better that column will be for indexing. Consider the ID number column
of the previous example. Here there are no duplicates, only unique
values. This column will be ideal for indexing. On the other end of
the scale may be the first names column. Here there will probably be a
number of duplicate names (fewer unique values) and a lower
cardinality compared to the ID column.

Yes, cardinality is the correct term.

Now, for bonus credits: can anyone tell me the correct term for
someone who posts a homework question here, gets an answer, and then
pretends he worked the answer out for himself?

Lemming
--
Curiosity *may* have killed Schrodinger's cat

Way to jump all over a thread that died 2 weeks ago.
Mate, most of usenet died more than 2 years ago. What does it matter
if I'm reviving someone's fortnight-old homework? Especially if I am
taking the piss.

Do try to keep up.

Unless, of course, it was *your* homework? Forgive me if so; I can't
be bothered to read back. But I can understand why you might be
feeling a bit sensitive about it.

Lemming
--
Curiosity *may* have killed Schrodinger's cat.
Apr 28 '07 #11
On Apr 27, 9:01 pm, Lemming <thiswillbou... @bumblbee.demon .co.uk>
wrote:
On 27 Apr 2007 17:52:00 -0700, hpuxrac <johnbhur...@sb cglobal.net>
wrote:


On Apr 27, 8:21 pm, Lemming <thiswillbou... @bumblbee.demon .co.uk>
wrote:
On 12 Apr 2007 18:23:07 -0700, sqlservernew... @yahoo.com wrote:
I found out. It is called "COLUMN CARDINALITY"
Sorry, no prizes.
http://www.informatik.uni-trier.de/~...WhangVT90.html
(1) obtaining the column cardinality (the number of unique values in a
column of a relation) and
(2) obtaining the join selectivity (the number of unique values in the
join column resulting from an unconditional join divided by the number
of unique join column values in the relation to Be joined).
These two parameters are important statistics that are used in
relational query optimization and physical database design.
http://www.idig.za.net/mysqlindexes/2006/11/09/
Column cardinality. This is the number of unique values contained in a
column. Indexes work best when there is a high cardinality. Put
another way, the more unique values there are (fewer duplicates) the
better that column will be for indexing. Consider the ID number column
of the previous example. Here there are no duplicates, only unique
values. This column will be ideal for indexing. On the other end of
the scale may be the first names column. Here there will probably be a
number of duplicate names (fewer unique values) and a lower
cardinality compared to the ID column.
Yes, cardinality is the correct term.
Now, for bonus credits: can anyone tell me the correct term for
someone who posts a homework question here, gets an answer, and then
pretends he worked the answer out for himself?
Lemming
--
Curiosity *may* have killed Schrodinger's cat
Way to jump all over a thread that died 2 weeks ago.

Mate, most of usenet died more than 2 years ago. What does it matter
if I'm reviving someone's fortnight-old homework? Especially if I am
taking the piss.

Do try to keep up.

Unless, of course, it was *your* homework? Forgive me if so; I can't
be bothered to read back. But I can understand why you might be
feeling a bit sensitive about it.
Not exactly.

Different people pick different tools to read these posting.

The cdos group is still very active. This item was cross posted to
various groups and was effectively dead until you chimed in.

Personally I use the google groups interface. If you take a look at
that tool you might have a different opinion about the health of what
used to be usenet. Plus it allows you to see the question from the
op, the replies and the thread in context.

Many of the other people responding in cdos use other tools.

Apr 28 '07 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
405
by: sqlservernewbie | last post by:
Hi Everyone, Here is a theoretical, and definition question for you. In databases, we have: Relation a table with columns and rows
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9416
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9849
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8861
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7393
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6661
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5433
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3551
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.