1.18k likes | 1.27k Vues
MySQL Query Lab II 25 Points. MySQL TU Database 3343 Dr. Thomas Hicks . You May Do This Lab On Your Own Personal Computer Or On Your Database System. Your Name _________________ Name This Presentation: Tom-Hicks-MySQL-Query-2.pptx {Substitute Your First & Last Names}.
E N D
MySQL Query Lab II • 25 Points • MySQLTU Database 3343 • Dr. Thomas Hicks
You May Do This Lab On Your Own Personal Computer Or On Your Database System
Your Name _________________ Name This Presentation: Tom-Hicks-MySQL-Query-2.pptx{Substitute Your First & Last Names}
Computer Used Is _________________ {My Personal Computer or CS-??}
Your Slide Presentation Should Include Screen Captures That Are Cropped – Clear & Easy To Read
Helpful HintThere Will Often Be A Colored Title Bar At The Top Of A Slide If This Bar Is Light Blue – It Is Info That You Should Read! If This Bar Is Red – You Will Have Screen Captures To Replicate And/Or Questions To Answer If This Bar Is Green – You Will Have To Create Original Screen Captures And/Or Questions To Answer
Use The Snippping Tool To Help You With Your Screen Captures Use Both The Rectangular Snip & The Window Snip As Is Appropriate!
Use Good/Neat/Readable Captures Crop Your CapturesDon’t Include Extraneous Stuff! This Is Not Good! BAD!
Use The Document Query • Format For All Slides! • SELECT …. First LineFROM … Next Line • WHERE … Next Line If ThereORDER BY … Next Line If There Document Query Format
Use The MySQL Command Line ClientAnswer All QuestionsReplace Screen Captures
The Basics Of SQL Are Generic Many Implementations Of MySQL Offer Additional Enhancements (i.e. MySQL Might Have A String Function, Or Mathematical Function, That Might Not Be Available In MSSQL) You Can Generally Add Your Own Custom Functions To Most SQL Environments.
Reload The Library-Hicks • (Be Sure To Load The Copy Of The File Attached With This Presentation) • Don't Necessarily Expect Your Output To Be Exactly Like Mine! • The Queries Will Work. Check Your Own Output!
Getting Ready To Change Window Properties Using the mouse, Right Mouse Click On The Top Of The Window and Select Properties
Set The Window Screen Text To WhiteSet Your Background To Red, Black, Green, Or NavyDo Not Select Maroon Background
Set The Window Screen Text To WhiteSet The Background To Red, Black, Green, Or NavyDo Not Select Maroon Background
Put File Library-Hicks.sql On Your DesktopShow The Size In General Properties
Select CatalogsMake Sure That Your Library Database Is Included In The List
Select Restore. Select Another Schema. Select Your Library??Push Open Backup File
All Of The Fields In Your Database Will Match Those In My Database 100% • I Reserve The Right To Use Slightly Different Data In An Effort To Ensure That You Carefully Examine Your Own Queries! • All Of The Relationships In Your Database Will Match Those In My Database 100% • All Of The Table & Field Names Will Match 100%
Display The List Of All Databases;Replace The Capture Below!
1] Display The List Of All Databases;2] Create A New Database, Called Junk3] Display The List Of All Databases;Replace The Capture Below!
1] Display The List Of All Databases;2] Create A New Database, Called DrEggen3] Display The List Of All Databases;Replace The Capture Below!
1] Display The List Of All Databases;2] Create A New Database, Called Practice?? (Replace ?? With Your Initials)3] Display The List Of All Databases;Replace The Capture Below!
CREATE TABLE … • ( • (Variable Name) Data-Type, (Variable Name) Data-Type, • . • .. (Variable Name) Data-Type • );
1] Display The List Of All Tables In The Default/Open Database;2] Create A Table Called Players (First -15 chars & Last – 20 chars)3] Display The List Of All Tables In The Default/Open Database; 4] Display The Layout Of Table Players;Replace The Capture Below!
1] Display The Table Listing;2] Create A Table Called Books (BKName -30 chars No int)3] Display The Table Listing; 4] Display The Layout Of Table Books;Replace The Capture Below!
1] Display The Table Listing;2] Create A Table Called Ranks(Description -40 char, ID-int)3] Display The Table Listing; 4] Display The Layout Of Table Ranks; Replace The Capture Below!
1] Display The Table Listing;2] Create A Table Called Officers (FullName -40 char, RanksID–int, SerialNo-16 char )3] Display The Table Listing; 4] Display The Layout Of Table Officers ; Replace The Capture Below!
1] Display The Table Listing;2] Create A Table Called Students (ID-Auto , First-15 char , Last-15 char)3] Display The Table Listing; 4] Display The Layout Of Table Ranks; Replace The Capture Below!
1] Display The Table Listing;2] Create A Table Called Parts(ID-Auto , Description-30 char, SupplierID-int, QtyInStock-int, QtyToStock-int, 15 char, RetailCost-float)3] Display The Table Listing; 4] Display The Layout Of Table Parts; Replace The Capture Below!
1] Display The Books Table Layout; 2] Add ‘Introduction To MySQL Database’ & 1 to Table Books3] Display all of the Books Table Information.Replace The Capture Below!
1] Display The Books Table Layout; 2] Add ‘Introduction To MySQL Database’ & 1 to Table Books3] Display all of the Books Table Information. Replace The Capture Below!
1] Add ‘SQL Web Programming’ & 2 to Table Books (With Out The INSERT INTO List)2] Display all of the Books Table Information. If you do not specify the list, the assumption is that you are going to add fill each and every field in the table in the same order as the table listing. Replace The Capture Below! When You Follow The Exact Field Order& Include All FieldsYou Need Not Include The Field Listing!
1] Add ‘Software Engineering’ to Table Books (without providing An ID)2] Display all of the Books Table Information. Since Field No can be Null, it is optional; it is not required. When an INSERT INTO Query is executed, some value will be placed in each and every field; the default value is used for any missing optional fields. No is optional; when it is missing, the default value, NULL, will be substituted automatically.Replace The Capture Below! When NULL = YesThe Field Is Optional!
1] Add 5 to Table Books (without providing An BKName)2] Display all of the Books Table Information. Since Field BKName can be Null, it is optional; it is not required. When an INSERT INTO Query is executed, some value will be placed in each and every field; the default value is used for any missing optional fields. BKName is optional; when it is missing, the default value, NULL, will be substituted automatically.Replace The Capture Below! When NULL = YesThe Field Is Optional!
1] Add (6 & “Networking”) to Table Books (in this order)2] Display all of the Books Table Information. 3] Display the number of records in Books; assign it to NoBooks.Include The Capture Below!