Cardinality

    Date: 03/16/07 (MySQL Communtiy)    Keywords: mysql, sql

    Wiki tells me:

    In mathematics, the cardinality of a set is a measure of the "number of elements of the set".

    So -- I assigned an index to an indicator field when a table was created:

    Keyname      Type      Cardinality    Field
    infant       INDEX     1              infant
    
    Now...
    mysql> SELECT DISTINCT(infant) FROM table;
    +----------+
    |  infant  |
    +----------+
    | NULL     |
    | A        |
    | B        |
    | C        |
    | U        |
    +----------+
    5 rows in set (0.09 sec)

    Shouldn't the cardinality of "infant" be 5? 

    Source: http://community.livejournal.com/mysql/111487.html

« How I earn up to $4500,... || Downloading data »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home