Jump to content
Larry Ullman's Book Forums

Recommended Posts

I think I am stuck here. I am confused if I am getting the right concept.

 

1) Index

2) 2NF & 3NF

3) Character SET  &  Collation

4) Primary Keys, Foreign keys

 

I think this is Important for me to understand before I jump to chapter 7.

 

Index), By index, what I understand after watching some videos and reading from book too, that its something like creating a copy of a 'column', maybe in memory so that searching data can be easy.

 

2NF & 3NF), I think I am lost here, 1NF is to make sure columns are atomic that is no multiple data, 2NF is to make sure that nothing is being repeated or minimum redundancy as well as to assign primary and foreign keys. 3NF is achieved once we already achieve 1NF and 2NF. 3Nf makes sure database is normalized with keys, minimum redundancy, atomic columns. 

 

Character set), so character set is other word for encoding, when assigned to a column or table, only that type of data/texts can be stored. and collations are rules for it or a type within charset.

 

Keys), primary key is the main key and foreign key is a copy of primary key, or points to primary key, or is a reference to primary key. So if primary key is altered i.e if its incremented, foreign key gets incremented automatically?

 

I am not sure if I got the right concept, if not please correct me. This is really confusing for me. I am not getting whats behind, I mean okay I now know how to create/update/ database tables columns etc. But whats happening in background is confusing me. how are all these linked together. 

MySQL manual is kind of more complex for a newbie like me. 

 

 

 

Please help me.

 

Thank you.

 

Link to comment
Share on other sites

Index), By index, what I understand after watching some videos and reading from book too, that its something like creating a copy of a 'column', maybe in memory so that searching data can be easy.

Yes, exactly. You're telling the database to pay particular attention to the values in the indexed column in order to more quickly access values.

 

2NF & 3NF), I think I am lost here, 1NF is to make sure columns are atomic that is no multiple data, 2NF is to make sure that nothing is being repeated or minimum redundancy as well as to assign primary and foreign keys. 3NF is achieved once we already achieve 1NF and 2NF. 3Nf makes sure database is normalized with keys, minimum redundancy, atomic columns.

You have the gist of it. Normalization IS tricky to grasp. You may want to sit with it a bit, knowing you'll be more comfortable about it in time, or perhaps read other examples online. But you do have the core concepts now, even if it doesn't feel that way.

 

Character set), so character set is other word for encoding, when assigned to a column or table, only that type of data/texts can be stored. and collations are rules for it or a type within charset.

Yes, character set is equivalent to encoding, which is to say: what characters/alphabet can be stored? Collation define rules for working with that character set, such as how to sort words.

 

Keys), primary key is the main key and foreign key is a copy of primary key, or points to primary key, or is a reference to primary key. So if primary key is altered i.e if its incremented, foreign key gets incremented automatically?

Close, but primary keys by definition should never change.

 

All in all, it sounds like you're grasping this really well!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...