Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Cardinality;PRIMARY Index;Indexes

Posted on 2006-07-19
3
Medium Priority
?
907 Views
Last Modified: 2008-02-26
Can someone please explain what these terms mean/do?

Cardinality;PRIMARY Index;Indexes

I've seen them in phpmyadmin and are wondering what they are used for.
0
Comment
Question by:mnb93
  • 2
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 17136887
Cardinality:
  means how many different values you have for 1 column. for a primary key or unique constraints , it must be 1
 

primary key:
  is a constraint enforcing you have each value only once in the table. trying to update or insert duplicate values will be rejected

indexes:
  like in books, a index is to find information quicker.
0
 
LVL 5

Author Comment

by:mnb93
ID: 17136927
if I set something to an index that does what? (one hand typing atm ,soory.)
0
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 17137097
an index is a additional structure besides the table, kept up-to-date automatically, that helps WHERE clause to be fast.

like Persons table : PersonID, PersonName

if you don't put a index on PersonID, getting a single row can take more and more time, the larger the table.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question