Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

SQL Keys and diagram

SQL Keys and diagram

SQL Keys and diagram

Hello, just started learning SQL and have some questions.

First is what is the diagram and how is it useful. All i understand is that the primary key is the column with unique entries.
Using this picture for example from http://searchsqlserver.techtarget.com/feature/A-su... could someone point me a really good explanation for it?

Also, If I ran a select query on a stupidly large data, does it have a fail safe of not providing me with data? I ask this because I'm getting zilch when I know data should be there.

Third, is there a way to view the large amount of data inside tables without knowing what I want to query from it? Like have it list everything in it.
I've tried Select * From tblsomething and nothing is returned to me.

RE: SQL Keys and diagram

1 the diagram is useful to gain an understanding of the relationships between tables

picture = 1000 words

2 that's only a proposed architecture, and only for surrogate keys

it's ~not~ the way you should be learning about primary keys

2a if you are getting zilch when you know there should be some rows, that means you've done something wrong in your query

3 if SELECT * FROM tblsomething returns no rows, that means there aren't any rows

r937.com | rudy.ca
Buy my new book Simply SQL from Amazon

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close