Question

This are few of the fundamental database questions which has always given me trouble. I have tried using google and wiki but I somehow I miss out on understanding the functionality rather than terminology.

If possible would really appreciate if someone can share more insights on this questions using some visual representative examples.

  • What is a key? A candidate key? A primary key? An alternate key? A foreign key?

  • What is an index and how does it help your database?

  • What are the data types available and when to use which ones?

Was it helpful?

Solution

I highly recommend Data Modeling for Information Professionals. You are asking about basic fundamental theory and concepts which are much better explained in a book than on a Q&A answer site like SO.

OTHER TIPS

Buy an introductory book about relational databases, such as one of these.

You could simple search google or wiki...

What is an index and how does it help your database?

What are the data types available and when to use which ones?

But in every database (every version of the same db) You can have other data types...its better if You specify which type of db You are interesting

A primary key

In this site You find other keys also ;)

There's not really much difference between a "primary key" and an "alternate key". Searches by primary key might be more optimized.

Data types vary a lot between databases, but generally you'll have:

  • Numeric data types like INTEGER and REAL.
  • At least one string type like VARCHAR.
  • Raw binary data (BLOB).
  • NULL, to indicate the absence of a value.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top