Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old April 12th, 2007, 04:55 PM
sqlservernewbie@yahoo.com
Guest
 
Posts: n/a
Default 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: M, F.
The result is 2 unique values.


What do we call this concept?
"the number of unique values in a column?"

Is there one?


Thanks a lot!

  #2  
Old April 12th, 2007, 07:45 PM
Larry Coon
Guest
 
Posts: n/a
Default Re: Theoretical definition for the number of unique values?

sqlservernewbie@yahoo.com wrote:
Quote:
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: M, F.
The result is 2 unique values.
>
What do we call this concept?
"the number of unique values in a column?"
>
Is there one?
Using your definitions, it'd probably be "the cardinality of the
domain."


Larry Coon
University of California
  #3  
Old April 12th, 2007, 08:05 PM
hpuxrac
Guest
 
Posts: n/a
Default Re: Theoretical definition for the number of unique values?

On Apr 12, 11:47 am, sqlservernew...@yahoo.com wrote:
Quote:
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: M, F.
The result is 2 unique values.
>
What do we call this concept?
"the number of unique values in a column?"
>
Is there one?
>
Thanks a lot!
distinct values

For a column or set of columns which together an index is created from
you can think of it as distinct keys

  #4  
Old April 12th, 2007, 08:25 PM
The Boss
Guest
 
Posts: n/a
Default Re: Theoretical definition for the number of unique values?

sqlservernewbie@yahoo.com wrote:
Quote:
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: M, F.
The result is 2 unique values.
>
>
What do we call this concept?
"the number of unique values in a column?"
>
Is there one?
>
>
Thanks a lot!
(Column) Cardinality = number of distinct column/attribute values.
Table Cardinality = number of rows in a table.

--
Jeroen


  #5  
Old April 12th, 2007, 09:15 PM
David Kerber
Guest
 
Posts: n/a
Default Re: Theoretical definition for the number of unique values?

In article <461e877b$0$328$e4fe514c@news.xs4all.nl>,
usenet@No.Spam.Please.invalid says...
Quote:
sqlservernewbie@yahoo.com wrote:
Quote:
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: M, F.
The result is 2 unique values.


What do we call this concept?
"the number of unique values in a column?"

Is there one?


Thanks a lot!
>
(Column) Cardinality = number of distinct column/attribute values.
Table Cardinality = number of rows in a table.
Shouldn't that be *distinct* (non-duplicate) rows in the table?


--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
  #6  
Old April 12th, 2007, 11:15 PM
Gord
Guest
 
Posts: n/a
Default Re: Theoretical definition for the number of unique values?

On Apr 12, 4:14 pm, David Kerber
<ns_dkerber@ns_WarrenRogersAssociates.comwrote:
Quote:
In article <461e877b$0$328$e4fe5...@news.xs4all.nl>,
use...@No.Spam.Please.invalid says...
>
>
>
Quote:
sqlservernew...@yahoo.com wrote:
Quote:
Hi Everyone,
>
Quote:
Quote:
Here is a theoretical, and definition question for you.
>
Quote:
Quote:
In databases, we have:
>
Quote:
Quote:
Relation
a table with columns and rows
>
Quote:
Quote:
Attribute
a named column/field of a relation
>
Quote:
Quote:
Domain
a set of allowable values for one or more attributes
>
Quote:
Quote:
Tuple
a row of a relation
>
Quote:
Quote:
Degree
the number of attributes a relation contains
Number of fields in a table
>
Quote:
Quote:
Cardinality
the number of tuples/rows a relation contains
>
Quote:
Quote:
But!
>
Quote:
Quote:
What is the definition for the number of unique values in a field?
>
Quote:
Quote:
So, if you have 100 rows in a table, and the field is
the gender field, with only values of: M, F.
The result is 2 unique values.
>
Quote:
Quote:
What do we call this concept?
"the number of unique values in a column?"
>
Quote:
Quote:
Is there one?
>
Quote:
Quote:
Thanks a lot!
>
Quote:
(Column) Cardinality = number of distinct column/attribute values.
Table Cardinality = number of rows in a table.
>
Shouldn't that be *distinct* (non-duplicate) rows in the table?
I believe that one of the cardinal rules (pun intended) of RDBMS
theory is that a table can never have duplicate rows.
Quote:
--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).

  #7  
Old April 13th, 2007, 08:25 AM
Martijn Tonies
Guest
 
Posts: n/a
Default Re: Theoretical definition for the number of unique values?

Quote:
Quote:
Quote:
Here is a theoretical, and definition question for you.
Quote:
In databases, we have:
Quote:
Relation
a table with columns and rows
Quote:
Attribute
a named column/field of a relation
Quote:
Domain
a set of allowable values for one or more attributes
Quote:
Tuple
a row of a relation
Quote:
Degree
the number of attributes a relation contains
Number of fields in a table
Quote:
Cardinality
the number of tuples/rows a relation contains
Quote:
But!
Quote:
What is the definition for the number of unique values in a field?
Quote:
So, if you have 100 rows in a table, and the field is
the gender field, with only values of: M, F.
The result is 2 unique values.
Quote:
What do we call this concept?
"the number of unique values in a column?"
Quote:
Is there one?
Quote:
Thanks a lot!
Quote:
(Column) Cardinality = number of distinct column/attribute values.
Table Cardinality = number of rows in a table.
Shouldn't that be *distinct* (non-duplicate) rows in the table?
>
I believe that one of the cardinal rules (pun intended) of RDBMS
theory is that a table can never have duplicate rows.
True. There's no point in having duplicate rows, cause you can't tell
which one you're handling :-)



--
Martijn Tonies
Database Workbench - development tool for MySQL, and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com


  #8  
Old April 13th, 2007, 01:25 PM
David Kerber
Guest
 
Posts: n/a
Default Re: Theoretical definition for the number of unique values?

In article <461f2fcd$0$11982$e4fe514c@dreader14.news.xs4all.n l>,
m.tonies@upscene.removethis.com says...
Quote:
>
Quote:
Quote:
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: M, F.
The result is 2 unique values.
>
What do we call this concept?
"the number of unique values in a column?"
>
Is there one?
>
Thanks a lot!
>
(Column) Cardinality = number of distinct column/attribute values.
Table Cardinality = number of rows in a table.
>
Shouldn't that be *distinct* (non-duplicate) rows in the table?
I believe that one of the cardinal rules (pun intended) of RDBMS
theory is that a table can never have duplicate rows.
>
True. There's no point in having duplicate rows, cause you can't tell
which one you're handling :-)
True, but are you telling me you've never had it happen accidentally??


--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
  #9  
Old April 13th, 2007, 04:55 PM
DA Morgan
Guest
 
Posts: n/a
Default Re: Theoretical definition for the number of unique values?

David Kerber wrote:
Quote:
Quote:
>True. There's no point in having duplicate rows, cause you can't tell
>which one you're handling :-)
>
True, but are you telling me you've never had it happen accidentally??
Assuming the database is being used as more than an electronic form
of Excel or 3x5 cards ... no. Primary key constraints were invented
for a reason. Like seat belts they are most useful when used.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles