Download presentation
Presentation is loading. Please wait.
Published byCollin Randall Modified over 9 years ago
1
1
2
2
5
5
6
6 If This Bar Is Light Blue – It Is Info That You Should Read! Helpful Hint There Will Often Be A Colored Title Bar At The Top Of A Slide 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
7
7 Use The Snippping Tool To Help You With Your Screen Captures Use Both The Rectangular Snip & The Window Snip As Is Appropriate!
8
8 Trying To Capture SHOW FIELDS Command:
9
9 Use Good/Neat/Readable Captures Crop Your Captures Don’t Include Extraneous Stuff! This Is Not Good!
10
10
12
12
13
SQL? 13 SQL is an acronym for _____________________________________________________
14
14
15
Starting MySQL In The Labs Open A CMD Window 15
16
Starting MySQL In The Labs On Your Computer Replace The Bottom Screen Capture With Yours 16
17
Open MySQL Command Line Client Replace The Capture Below! 17 We Are Using MySQL Server Version _?_ {4.4.3-beta below}
18
18
19
Put File Library-Hicks.sql On Your Desktop Show The Size In General Properties Replace The Capture Below! 19
20
20
21
Display The MySQL Commands Replace The Capture Below! 21
22
22
23
Getting Ready To Change Window Properties 23 Using the mouse, Right Mouse Click On The Top Of The Window and Select Properties
24
Set The Window Screen Text To White Set Your Background To Red, Black, Green, Or Navy Do Not Select Maroon Background 24
25
Set The Window Properties As Illustrated Below Replace The Capture Below! 25
26
Set The Window Screen Text To White Set The Background To Red, Black, Green, Or Navy Do Not Select Maroon Background 26
27
27
28
Create Database Library?? [Replace ?? With Your Initials] Show All Databases On Your System Replace The Capture Below! 28
29
29
30
Start MySQL WorkBench 30
31
Push The New Connection Link In SQL Development 31
32
Enter localhost Push Store In Vault Button 32
33
Enter The Root Password! 33
34
Push The Test Connection Button 34
35
If Connection OK Push The OK Button 35
36
Double-Click On connection (localhost) 36
37
Open The Script File 37
38
Select Library-Hicks.sql From The Desktop 38
39
Double-Click On connection (localhost) 39
40
Save The Script To File 40
41
Refresh – Right Mouse Click – Schemas/Databases 41
42
You Should Have Database LibraryTH 42
43
Change The 3 References To LibraryTH To Library?? Where ?? Are Your Initials 43
44
Doug Wolf Would Make The Following Changes Execute & Save & Refresh 44
45
It Is That Easy To Make Test Copy Of A Database From The.sql Backup File 45
46
46 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%
47
47
48
Definitions of Database on the Web: A database is an organized body of related information wordnetweb.princeton.edu/perl/webwn wordnetweb.princeton.edu/perl/webwn A database is a structured collection of records or data that is stored in a computer system. The structure is achieved by organizing the data... en.wikipedia.org/wiki/Database en.wikipedia.org/wiki/Database A database is a systematically arranged collection of computer data, structured so that it can be automatically retrieved or manipulated validwebdesigns.com/glossary/ validwebdesigns.com/glossary/ A database is a collection of data organized for search and retrieval. summitschool.com/8review/dbssterms.doc summitschool.com/8review/dbssterms.doc A collection of interrelated data items stored together without unnecessary redundancy, to serve one or more applications. www.4pcb.com/index.php www.4pcb.com/index.php 48
49
49
50
Show All Databases On Your System. Open Your Library?? Database. Only One Database May Be Open At A Time. Replace The Capture Below! 50
51
51
52
Show The Commands To: Show All Tables In The Open Database Replace The Capture Below! 52
53
53 1] Open Your Library?? Database 2] Display The Tables The MySQL Database Without Opening It Replace The Capture Below! The MySQL Database contains information about Databases, Tables, Users, Permissions, etc. Although you could alter it with the superuser (root) account, it is quite easy to destroy your MySQL system in the process! Don’t Change The MySQL Database!
54
54
55
1] Open Your Library?? Database 2] Display The Tables In The Open Database 3] Show The Table Layout For Authors Replace The Capture Below! 55
56
1] Show A Table Listing For Authors Two Different Ways Replace The Capture Below! 56
57
1] Show A Table Listing For Servers Two Different Ways Include The Capture Below! 57
58
58
59
A Graphical View Of Table Users The Table Layout May Be Seen Below! 59
60
60
61
1] Show A Table Layout For Users Replace The Capture Below! 61
62
62
63
1] Display All Of The Information About All Of The Users Replace The Capture Below! 63
64
64
65
65
66
1] Display The First, Last, & Email Of All Of The Users Replace The Capture Below! 66
67
1] Display The FullName, Phone, & Email Of All Of The Users Include The Screen Capture Below! 67
68
1] Display The FullName, UserName, & Email Of All Of The Users Include The Screen Capture Below! 68
69
69
70
1] Display The ID, First, Last, & Email Of All Of The Users Whose ID Is Greater Than Or Equal To 5 Replace The Capture Below! 70
71
1] Display The ID, First, Last, & Email Of All Of The Users Whose ID Is Less Than Or Equal To 3 Include The Screen Capture Below! 71
72
1] Display The ID, First, Last, & Email Of All Of The Users Whose ID Is Equal To 2 Replace The Capture Below! 72
73
73
74
1] Display The ID, First, Last, & Email Of All Of The Users Whose ID Is In The Range 7 to 9 (Three Different Ways) Replace The Capture Below! 74
75
1] Display The ID, First, Last, & Email Of All Of The Users Whose ID Is In The Range 13 to 15 (Three Different Ways) Include Screen Capture Below! 75
76
1] Display The ID, First, Last, & Email Of All Of The Users Whose ID Is Not Equal To 5 Replace The Capture Below! 76
77
1] Display The ID, First, Last, & Email Of All Of The Users Whose ID Is Not Equal To 1 Include The Capture Below! 77
78
1] Display The ID, First, Last, & Email Of All Of The Users Whose ID Is Not Equal To 5. Do Not Use <> Replace The Capture Below! 78
79
1] Display The ID, First, Last, & Email Of All Of The Users Whose ID Is Not Equal To 5. Do Not Use <> Or != Replace The Capture Below! 79
80
1] Display The ID, First, Last, Administrator & Email Of All Of The Users Whose ID Is Not An Administrator. Include The Capture Below! 80
81
1] Display The ID, First, Last, & Email Of All Of The Users Whose ID 1, 3, or 5 (Two Different Ways) Replace The Capture Below! 81
82
1] Display The ID, First, Last, & Email Of All Of The Users Whose ID 2, 4, 6, or 8 (Two Different Ways) Include The Capture Below! 82
83
83
84
1] Display The ID, First, Last, & Email Of All Of The Users; order the data by First Name Replace The Capture Below! 84
85
1] Display The ID, First, Last, & Email Of All Of The Users; order the data by Last Name Include The Screen Capture Below! 85
86
1] Display The ID, First, Last, UserName, Email & FullName Of All Of The Users Whose ID Is In The Range 7 to 13; Order By FullName Replace The Capture Below! 86
87
1] Display The ID, First, Last, UserName, Email & FullName Of All Of The Users Whose First Name Is Either “Jordan” or “JORDAN” Replace The Capture Below! 87 When Using The MySQL Query Language, Searching For Strings __??__ {Is/Is Not} Case Sensitive!
88
1] Display The ID, First, Last, UserName, Email & FullName Of All Of The Users Whose First Name Is Either ‘Jordan’ or ‘JORDAN’ Replace The Capture Below! 88 _____ {T/F} When Searching For Strings Using The MySQL Query Language, Strings May Be Delimited By Either Single Or Double Quotes. _____ {T/F} When Searching For Strings Using The MySQL Query Language, A String May Begin With A Single Quote And End With A Double Quote.
89
1] Display The ID, First, Last, UserName, Email & FullName Of All Of The Users Whose Last Name Is Wong Include The Capture Below! 89
90
90
91
1] Display The ID, First, Last, UserName, Email & FullName Of All Of The Users Whose Last Name Begins With A ‘W’ Replace The Capture Below! 91
92
1] Display The ID, First, Last, UserName, Email & FullName Of All Of The Users Whose Last Name Or First Name Contains ‘AN’ Replace The Capture Below! 92
93
1] Display The ID, First, Last, UserName, Email & FullName Of All Of The Users Whose First Name Ends With An ‘M’ Replace The Capture Below! 93
94
1] Display The ID, First, Last, UserName, Email & FullName Of All Of The Users Whose Last Name Or First Name Contains An ‘O’ Include The Capture Below! 94
95
1] Display The ID, First, Last, & Phone Of All Of The Users Whose Phone Number Contains Either A ‘3’ Or A ‘4’ Include The Capture Below! 95
96
96
97
1] Display The First, Last & Of All Of The Users; Make Sure The First And Last Name Are Capital (Upper Case) Replace The Capture Below! 97
98
1] Display The First, Last & Of All Of The Users; Make Sure The First And Last Name Are Capital (Upper Case) And Email Is Non-Capital (Lower Case) Do Not Use Upper Or Lower! Replace The Capture Below! 98
99
1] Display The First, Last & Of All Of The Users; Make Sure All The Fields Are Non-Capital (Lower Case) Replace The Capture Below! 99
100
1] Display The String ‘tOm hICkS’ in Non-Capitals 2] Display The String ‘tOm hICkS’ in Capitals 3] Display The String ‘tOm hICkS’ in Non-Capitals And Capitals Replace The Capture Below! 100
101
1] Display The String ‘tOm hICkS’ in Non-Capitals 2] Display The String ‘tOm hICkS’ in Capitals 3] Display The String ‘tOm hICkS’ in Non-Capitals And Capitals Replace The Capture Below! 101
102
102
103
1] Display 123 2] Display 12 + 34 3] Display 2 * 3 + 4 * 5 Replace The Capture Below! 103 _____ {T/F} It Appears That MySQL Is Processing The Order Of Operations Correctly In The Examples Above.
104
1] Display 2^3 2] Display 2 + 2^3 3] Display 2 ^3^2 Replace The Capture Below! 104 _____ {T/F} It Appears That MySQL Is Processing The Order Of Operations Correctly In The Examples Above.
105
1] Display (2 * 3 / 4) * 10 – (4 / 2 + 1) 2] Display 2 + 3 ^ 2 Include The Capture Below! 105 _____ {T/F} It Appears That MySQL Is Processing The Order Of Operations Correctly In The Examples Above.
106
1] Display “12” + “34” 2] Display “12” / 4 Replace The Capture Below! 106 _____ {T/F} It Appears That MySQL Automatically Converts The Character Data “12” to Numeric When Applying Mathematical Operators +, -, /, and *.
107
107
108
1] Display “Community” + “Baptist” + “Church” Combined 2] Display First And Last Names Of All Users Combined In The Form ‘TomHicks’ Replace The Capture Below! 108
109
1] Display The Last Name + “, “ + First Name Of All Users; [Hicks, Tom] Include The Capture Below! 109
110
110
111
1] Display Characters 1, 2, and 3 of ‘CBCAlamoHeights.com’ 2] Display Characters 4, 5, 6, 7, and 8 of ‘CBCAlamoHeights.com’ 3] Display Characters 17, 18, and 19 of ‘CBCAlamoHeights.com’ Replace The Capture Below! 111
112
1] Display Characters 1, 2, and 3 of ‘CBCAlamoHeights.com’ 2] Display Characters 4, 5, 6, 7, and 8 of ‘CBCAlamoHeights.com’ 3] Display Characters 17, 18, and 19 of ‘CBCAlamoHeights.com’ Do Not Use SubString Replace The Capture Below! 112
113
1] Display The Combination of a) First Letter Of Each First Name (Lower Case) b) Last Name (Lower Case) c) “@trinity.edu” Include The Capture Below! 113
114
114
115
1] Start A Trace To File C:\Output.txt 2] Display The ID, First, Last, UserName, and Email Of All User In Order By Last Name. 3] Stop The Trace. Replace The Capture Below! 115
116
1] Open File C:\Output.txt with Notepad. Replace The Capture Below! 116
117
1] Start A Trace To File C:\Trinity.txt 2] Display The ID, First, Last, Phone, and Email Of All User In Order By FullName. 3] Stop The Trace. Include The Capture Below! 117
118
1] Open File C:\Trinity.txt with Notepad. Include The Capture Below! 118
119
119
120
1] Display A Vertical Listing Of The First, Last, Phone, and Email Of All Users Whose ID is Greater Than Or Equal To 13 Replace The Capture Below! 120
121
1] Display A Vertical Listing Of The ID, First, Last, Phone, and Email Of All Users Whose ID is Between 7 and 10 Include The Capture Below! 121
122
122
123
1] Display The Combination Of “ * ” + RRIM(“ Happy Days “) + “ * ” 2] Display The Combination Of “ * ” + LRIM(“ Happy Days “) + “ * ” 3] Display The Combination Of “ * ” + TRIM(“ Happy Days “) + “ * ” [There Are Times That Users Accidently Place Leading And/Or Trailing Blanks In Data Input – Trim May Be Used To Remove Those Blanks] Replace The Capture Below! 123
124
124
125
1] Display Average ID’s Of All Users; 2] Display The Sum Of The ID’s Of All Users; Replace The Capture Below! 125
126
1] Display Average ID’s Of All Users; 2] Display The Sum Of The ID’s Of All Users; 3] Display String “AVG(ID) = ??” Replace The Capture Below! 126
127
1] Assign 2 * 3 to X And Display; 2] Assign The Largest User ID To MAX_ID And Display; 3] ] Assign The Smallest User ID To MAX_ID And Display; Replace The Capture Below! 127
128
128
129
1] Do A Goggle Search For ASCII. Display The First 127 Values. Replace The Capture Below! 129
130
1] Display The Character Whose ASCII Value Is 65; 2] Display The Characters Whose ASCII Value Are 32, 97, and 48; 3] Display The ASCII Value Of Character ‘A’; 4] Display The ASCII Values Of Characters ‘ ’, ‘a’, and ‘0’ Replace The Capture Below! 130
131
1] Display The Character Whose ASCII Value Is 80; 2] Display The Characters Whose ASCII Value Are 35, 94, and 100; 3] Display The ASCII Value Of Character ‘+’; 4] Display The ASCII Values Of Characters ‘b’, ‘c’, and ‘d’ Include The Capture Below! 131
132
132
133
1] Display Floor and Ceiling of 2.51, 2.49, -2.51, 7 -2.49 Replace The Capture Below! 133
134
1] Display Floor and Ceiling 123.4567 & 123.5670 2] Display Floor and Ceiling 1.499999, 1.50001, & 1.500 Replace The Capture Below! 134
135
1] Display The Position Of ‘Maury’ In ‘Dr. Maury Eggen’; Assign It To Loc 2] Display The Position Of ‘Egg’ In ‘Dr. Maury Eggen’; Assign It To Pos 3] Display The Position Of ‘Dr’ In ‘Dr. Maury Eggen’; Assign It To Loc 4] Display The Position Of ‘Doc’ In ‘Dr. Maury Eggen’; Assign It To Loc Replace The Capture Below! 135
136
136
137
1] Display The First 5 Characters Of The First Name and The First 7 Characters Of The Last Name. Replace The Capture Below! 137
138
1] Display The Last 5 Characters Of The First Name and The Last 7 Characters Of The Last Name. Replace The Capture Below! 138
139
139
140
1] Display The Position Of ‘Maury’ In ‘Dr. Maury Eggen’; Assign It To Loc 2] Display The Position Of ‘Egg’ In ‘Dr. Maury Eggen’; Assign It To Pos 3] Display The Position Of ‘Dr’ In ‘Dr. Maury Eggen’; Assign It To Loc 4] Display The Position Of ‘Doc’ In ‘Dr. Maury Eggen’; Assign It To Loc Replace The Capture Below! 140
141
1] Display The Position Of ‘Egg’ In ‘Dr. Maury Eggen’; Assign It To Pos Do It Three Different Ways Replace The Capture Below! 141
142
1] Display First Name And The Position Of ‘A’ In The First Name For All Users Replace The Capture Below! 142
143
143
144
1] The Number Of Users 2] Display The First, Last, and Administrator For All Non-Administrators 3] Display The Number Of Non-Administrators Replace The Capture Below! 144
145
1] Display The Number Of Users That Have An ‘A’ In Their First Name 2] Display The Number Of Users That Have An ‘A’ As One Of The First Three Letters In Their First Name 3] Display The Number Of Users That Have An ‘.’ In Their Email Include The Capture Below! 145
146
146
147
1] Display The Length Of ‘Tom’ 2] Display The Length Of ‘Dr. Thomas Hicks’; Assign That Value To LEN_NAME Replace The Capture Below! 147
148
1] Display The Length Of ‘Tom’ 2] Display The Length Of ‘Dr. Thomas Hicks’ 3] Display The First Name and The Length Of The First Name For All Users Whose ID Is Greater Than Or Equal To 8 Replace The Capture Below! 148
149
1] Display The Number Of User Whose First Name Is 4 Characters In Length; Assign That Value To No_4_First 2] Display The Number Of User Whose First Name Is 5 Characters In Length; Assign That Value To No_5_First 3] Display The Number Of User Whose Last Name Is 7 Characters In Length; Assign That Value To No_7_Last Include The Capture Below! 149
150
150
151
1] Display All Of The User IDs; Pad Them On The Left With Blanks,.’s, and 0’s We Often Want To LPAD Numeric Replace The Capture Below! 151
152
1] Combine The First And Last Names Of All Users; Pad Them With 10.’s On The Right We Often Want To LPAD Strings On The Right With Blanks For Spacing On Reports Replace The Capture Below! 152
153
153
154
1] We Often Combine The Concat, Padding, Left, Right, Upper, Lower, etc. To Produce Single-Line Output For Reports. Replace The Capture Below! 154 Ignore Collateral Output! It Would Not Appear In The Report!
155
155
156
1] Display ‘Tom Hicks’ In Reverse Order 2] Display The First Name Of All Of The Users In Reverse Order. Replace The Capture Below! 156
157
157
158
1] Display ‘Tom’ 4 Times 2] Display 25 Blanks 3] Display 60 *’s Replace The Capture Below! 158
159
159
160
1] Display The Replacing Of All ‘W’s in WWW.trinity.edu with ‘w’s 2] Display The Replacing Of All ‘W’s in WWW.trinity.edu with ‘*’s 3] Display The Replacing Of All ‘.’s in WWW.trinity.edu with nothing Replace The Capture Below! 160
161
161
162
1] Display 20 ‘ ‘s 2] Display The First Name + 5 ‘ ‘s + Last Name of All Users; Assign It To Info. Replace The Capture Below! 162
163
163
164
1] Display Binary, Octal, and Hex Values of 15, 65, 255, 512, and 256 Replace The Capture Below! 164
165
165
166
1] Display 15 Mod 6 Using Both The Mod and % Functions 2] Display 1000 Mod 10 Replace The Capture Below! 166
167
167
168
1] Display The Absolute Values Of 10, -10, 2.2, and -2.2 Replace The Capture Below! 168
169
169
170
1] Display PI 2] Display The Area Of A Circle Whose Radius Is 3; Assign It To Area 3] Display The Log (Base 2) Of 15 and 1,000,000 Replace The Capture Below! 170
171
171
172
1] Display The Square Root of 2, 4, 9, and 1 2] Display The Square Root of15,248,792,196 Replace The Capture Below! 172
173
173
174
1] Display The Date Today 2) Display The Day Today 3) Display The Month Today 4] Display The Year Today Replace The Capture Below! 174
175
175
176
1] Display Now and The Current Hour 2) ] Display Now and The Current Minute 3) ] Display Now and The Current Second Replace The Capture Below! 176
177
177
178
1] Display Day Of Week And Day Name For Christmas of 2010 2] Display Day Of Week And Day Name For Dec 26th of 2010 3] Display Day Of Month And Month Name For Christmas of 2010 4] Display Day Of Year And Day Of Year For Christmas of 2010 Replace The Capture Below! 178
179
179
180
From The Capture Below, We Can See That The Big Integer Calculation Is Accurate To At Least 5 Digits; Continue This Process, Increase It By 1 Until It Is Goes Into Scientific Notation. Screen Capture Your Last Three SELECT Statements. Replace The Capture Below! 180
181
181
182
SHOW Your Status. Replace The Capture Below! 182
183
183
184
Questions 184 _____ {T/F} The Foundations Of SQL Are Generic. _____ {T/F} Each And Every Implementation Of SQL Have Exactly The Same Function Set. _____ {T/F} Some Implementations Of SQL Have Added Some Function Enhancements That May Not Be Available On Other SQL Systems. SQL is an Acronym For _________________________________
185
185
186
MySQL String & Numeric & Time Functions http://dev.mysql.com/doc/refman/5.0/en/string- functions.html http://dev.mysql.com/doc/refman/5.0/en/numeric- functions.html http://dev.mysql.com/doc/refman/5.0/en/date-and-time- functions.html 186
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.