1 00:00:00,090 --> 00:00:00,630 Okay. 2 00:00:00,660 --> 00:00:05,580 So we're at the end of this section and as always, it's your turn to put it into practice. 3 00:00:06,270 --> 00:00:08,130 As you can see by these giant letters. 4 00:00:08,520 --> 00:00:13,470 So we've got a couple of problems here that cover basically everything we talked about, not everything, 5 00:00:13,470 --> 00:00:17,580 but all the big things we talked about in this section, all about data types. 6 00:00:17,580 --> 00:00:26,070 So strings, text data types, numeric data types, and then date and time information and ways of working 7 00:00:26,070 --> 00:00:30,000 with those dates with some of the more common date functions. 8 00:00:30,480 --> 00:00:33,360 So there's a couple of of exercises here. 9 00:00:33,360 --> 00:00:39,160 Some of them involve writing code, some of them are fill in the blanks and some of them are just I 10 00:00:39,300 --> 00:00:42,690 don't know what you would call this free response, like this one here. 11 00:00:42,840 --> 00:00:43,860 So let's get started. 12 00:00:43,860 --> 00:00:45,870 And then in the next video, we'll have a solution. 13 00:00:46,350 --> 00:00:55,260 So this one, what's a good use case for CHA or chair or not chair, char or car, that data type. 14 00:00:55,260 --> 00:00:59,610 So when would you use that instead of or in lieu of var cha. 15 00:01:00,450 --> 00:01:04,560 So you can use one of the things that we talked about or come up with your own. 16 00:01:05,160 --> 00:01:06,330 You don't have to write it down. 17 00:01:06,330 --> 00:01:08,250 Just come up with something. 18 00:01:09,980 --> 00:01:10,760 Next up. 19 00:01:10,820 --> 00:01:11,870 Fill in the blanks here. 20 00:01:11,870 --> 00:01:19,700 So we've got a table that I'm creating called inventory or inventories or whatever, some sort of something 21 00:01:19,700 --> 00:01:22,250 that we're storing, books or toys. 22 00:01:22,250 --> 00:01:23,810 We've got an item name. 23 00:01:24,080 --> 00:01:25,670 What data type should that be? 24 00:01:27,190 --> 00:01:32,290 There's not necessarily one only one workable answer, but there's one better answer. 25 00:01:32,980 --> 00:01:36,100 PRICE So what data type should price be? 26 00:01:36,100 --> 00:01:41,620 And not just the type of not just the name of the data type, but what are you going to put in those 27 00:01:41,620 --> 00:01:42,550 parentheses? 28 00:01:43,320 --> 00:01:50,310 And as a note, all of our prices are less than $1 million, not equal to $1 million. 29 00:01:50,310 --> 00:01:52,830 Just to be clear, there are less than 1 million. 30 00:01:53,070 --> 00:01:55,830 So how would we represent that with our data type? 31 00:01:55,950 --> 00:01:58,830 And then quantity, that's a number as well. 32 00:01:58,830 --> 00:02:00,990 What data type makes the most sense there? 33 00:02:02,730 --> 00:02:04,200 Then moving on. 34 00:02:04,470 --> 00:02:07,770 What's the difference between date time and time stamp? 35 00:02:10,039 --> 00:02:13,730 There's not just one difference, but when would you use one versus the other? 36 00:02:13,910 --> 00:02:15,350 How are they different? 37 00:02:16,190 --> 00:02:17,230 This is we talked about it. 38 00:02:17,240 --> 00:02:19,730 We looked at the documentation for both of them. 39 00:02:19,820 --> 00:02:21,320 So hopefully it's not too hard. 40 00:02:22,520 --> 00:02:28,430 Next up in cloud nine, print out the current time using MySQL. 41 00:02:29,120 --> 00:02:30,530 So just the time. 42 00:02:31,840 --> 00:02:36,340 Then the next question is to print out the current date, but not the time. 43 00:02:36,340 --> 00:02:37,720 So just the date. 44 00:02:38,260 --> 00:02:44,140 And then once you've done that, print out the current day of the week, the number of the day of the 45 00:02:44,140 --> 00:02:44,350 week. 46 00:02:44,350 --> 00:02:49,120 So if it's a what is it, a Saturday, it should be seven. 47 00:02:49,510 --> 00:02:51,820 If it's a Friday six and so on. 48 00:02:51,910 --> 00:02:55,720 So just print that out and then do the same thing. 49 00:02:55,720 --> 00:02:57,160 Print out the current day of the week. 50 00:02:57,190 --> 00:03:01,180 But this time it should be the name of the day of the week, like Monday or Tuesday. 51 00:03:01,480 --> 00:03:08,710 So the English name of the day of the week for today, the current whenever you're running this print 52 00:03:08,710 --> 00:03:09,700 out the day of the week. 53 00:03:11,130 --> 00:03:16,170 Next up, print out the current day and time using this format. 54 00:03:17,430 --> 00:03:24,150 So two month or month, month slash, day, day slash, four digits for the year. 55 00:03:25,520 --> 00:03:27,910 And then once you've done that, we have another one. 56 00:03:27,920 --> 00:03:33,080 Print out the current day and time using this format, which I wasn't sure how to actually boil this 57 00:03:33,080 --> 00:03:37,250 down to a nice little formula like we have here. 58 00:03:37,250 --> 00:03:38,870 So I just gave you two examples. 59 00:03:39,050 --> 00:03:45,350 So we have the full month name, January or April, then we have this, which there's a name for it. 60 00:03:45,350 --> 00:03:47,060 I think it's the Anglicized. 61 00:03:48,530 --> 00:03:50,930 What is it, Anglicized digits or something? 62 00:03:50,930 --> 00:03:51,980 It's in the documentation. 63 00:03:51,980 --> 00:03:53,150 So we didn't cover this. 64 00:03:53,150 --> 00:03:56,390 You'll have to dig around to figure out how you format it this way. 65 00:03:56,390 --> 00:04:00,380 But with the day of the month, like to or one. 66 00:04:00,860 --> 00:04:03,950 But instead of just the number, we want this anglicized version. 67 00:04:03,950 --> 00:04:07,430 So second, first, third, 10th, and so on. 68 00:04:07,760 --> 00:04:09,440 And then at. 69 00:04:10,370 --> 00:04:11,540 And then the time. 70 00:04:12,440 --> 00:04:15,860 And for the time, we just want our colon minutes. 71 00:04:17,050 --> 00:04:17,529 Okay. 72 00:04:18,550 --> 00:04:20,839 After you've done that, we have one final thing. 73 00:04:20,860 --> 00:04:26,020 Create a tweet table and the tweets table should store the content of a tweet. 74 00:04:26,170 --> 00:04:27,790 So that's going to be text. 75 00:04:27,910 --> 00:04:33,730 And I believe, what is it, 140 characters and then a username. 76 00:04:33,730 --> 00:04:36,250 And we don't need a character limit for that. 77 00:04:36,250 --> 00:04:40,810 Let's or I don't know, let's say 20 characters, but that's not that important. 78 00:04:40,810 --> 00:04:44,530 And then we also want to store the time the tweet was created. 79 00:04:45,720 --> 00:04:46,160 Och. 80 00:04:46,710 --> 00:04:49,800 When you've done that, pat yourself on the back.