Tuesday, February 15, 2005
mySQL Hour 6
Oh well, I've crashed my user ID in the new forum. Great, I have to wait for Nick to get back from holiday to fix it, because, apparently he's the only one who can.
So, instead of frittering hours away in the conference, I'll fritter hours away on my blog and trying to second guess the typos and ommissions in the various course materials. Just as well we're not all daft doing this course!
Determine you goals
Do it!
Conceptualise the tables
I'm conceptualising them right now!!!
Split it up into "single entry" and "multiple entry" tables:
Look just give everthing an ID alright?
Then add Date Added and Date Modified fields.
Determining Relationships
Well if you know how to do it, it's easy; if you don't, it's still easy!!!
Basically break everything down into objects (entities I think the database terminology calls them), that's right, everything. Then give each thing its own ID.
Once you've done that add an ID for the thing that it's related to. In this example all the things are related to a person. People are stored in the Name table so add a nameID field to all the other tables in your schema (ooo!!! proper database word!).
The book (p.69) shows you the updated field name list for each table. Except that the Company table hasn't got a nameID added to it. This might be what they meant but I'm guessing that it's another TYPO!!!!!!!! We'll see ;)
Apparently we've just cracked the second normal form where the rule is "No non-key attributes depend on a portion of the primary key". So now you know.
Creating the Database
Huzzah!!! We're going to create a database now!!!
Summary
Well, we finally got there. Time to revisit my myODBC/mySQL installations and see if I can make them talk.
Soon we'll be off to mySQL Hour 7. Stay tuned.
So, instead of frittering hours away in the conference, I'll fritter hours away on my blog and trying to second guess the typos and ommissions in the various course materials. Just as well we're not all daft doing this course!
Determine you goals
Do it!
- Name
- Address
- Telephone Number
- Fax Number
- Job
- Company
- Personal notes
Conceptualise the tables
I'm conceptualising them right now!!!
Split it up into "single entry" and "multiple entry" tables:
Single | Multiple |
Name Job Company | Address Telephone Number Fax Number Personal notes |
Look just give everthing an ID alright?
Then add Date Added and Date Modified fields.
Determining Relationships
Well if you know how to do it, it's easy; if you don't, it's still easy!!!
Basically break everything down into objects (entities I think the database terminology calls them), that's right, everything. Then give each thing its own ID.
Once you've done that add an ID for the thing that it's related to. In this example all the things are related to a person. People are stored in the Name table so add a nameID field to all the other tables in your schema (ooo!!! proper database word!).
The book (p.69) shows you the updated field name list for each table. Except that the Company table hasn't got a nameID added to it. This might be what they meant but I'm guessing that it's another TYPO!!!!!!!! We'll see ;)
Apparently we've just cracked the second normal form where the rule is "No non-key attributes depend on a portion of the primary key". So now you know.
Creating the Database
Huzzah!!! We're going to create a database now!!!
- Create a database. At the c:\mysql\bin> prompt type:mysqladmin -u username -ppassword create contactDB
- Connect to mySQL monitor as the main (root - though I think I replaced that when I installed) user: /usr/local/bin/mysql -h localhost -u root --pyourpass
- Switch to the mySQL database. At the mysql> prompt type: use mysql.
- GRANT ALL ON contactDB.* TO supercontact@'yourhost' IDENTIFIED BY 'somepass';
- GRANT SELECT ON contactDB.* TO simpleusert@'yourhost' IDENTIFIED BY 'somepass';
Summary
Well, we finally got there. Time to revisit my myODBC/mySQL installations and see if I can make them talk.
Soon we'll be off to mySQL Hour 7. Stay tuned.
Comments:
<< Home
Great work!
[url=http://moqigkxm.com/kyqo/kbtb.html]My homepage[/url] | [url=http://zjyiokys.com/ahem/lcdw.html]Cool site[/url]
Post a Comment
[url=http://moqigkxm.com/kyqo/kbtb.html]My homepage[/url] | [url=http://zjyiokys.com/ahem/lcdw.html]Cool site[/url]
<< Home