1 00:00:00,270 --> 00:00:00,690 Okay. 2 00:00:00,690 --> 00:00:06,540 So before we see any new code or new commands, I want to clean up the data that we currently have. 3 00:00:06,570 --> 00:00:10,050 If you remember, we kind of added a bunch of different cat databases. 4 00:00:10,050 --> 00:00:13,500 We have cats and cats one and cats two and cats three and so on. 5 00:00:13,890 --> 00:00:21,300 What I want to do is delete the original cats table and then we're going to remake it, but with a few 6 00:00:21,600 --> 00:00:27,210 additions, because our original Cats table was the most basic, it only had name and age. 7 00:00:27,390 --> 00:00:31,230 But I want to add some other data in like an ID, that auto increment and so on. 8 00:00:31,230 --> 00:00:35,030 So basically we're just going to remake the Cats table and add new data in. 9 00:00:35,040 --> 00:00:39,930 So if you want to make a bit of an exercise out of this, the first step would be to delete the cats 10 00:00:39,930 --> 00:00:40,500 table. 11 00:00:40,860 --> 00:00:42,060 So do that now. 12 00:00:42,420 --> 00:00:46,770 And the command, if you want to see it, is drop table cats. 13 00:00:47,280 --> 00:00:48,270 So let's do it. 14 00:00:48,390 --> 00:00:50,280 Drop table cats. 15 00:00:50,320 --> 00:00:50,880 Whoops. 16 00:00:53,340 --> 00:00:54,120 There we go. 17 00:00:54,750 --> 00:00:58,350 And now that we've dropped the table, we want to recreate the table. 18 00:00:59,740 --> 00:01:01,390 So this is what we want here. 19 00:01:01,510 --> 00:01:05,980 We're going to have a cat ID integer, not null auto increments. 20 00:01:06,010 --> 00:01:08,050 We're going to have a name that's a var char. 21 00:01:08,080 --> 00:01:08,800 A breed. 22 00:01:08,800 --> 00:01:09,940 That's a var char as well. 23 00:01:09,940 --> 00:01:13,900 An age that is an integer and cat ID is our primary key. 24 00:01:13,930 --> 00:01:18,460 So if you'd like, go ahead and type that out or just copy it, paste it in. 25 00:01:19,520 --> 00:01:20,270 Perfect. 26 00:01:20,870 --> 00:01:22,400 Of course, we could make sure it worked. 27 00:01:22,430 --> 00:01:23,750 Describe cats. 28 00:01:24,320 --> 00:01:25,160 There we go. 29 00:01:25,820 --> 00:01:26,420 All right. 30 00:01:26,420 --> 00:01:29,810 So the last step here is to add new data in. 31 00:01:30,470 --> 00:01:35,390 And I would like for you to have this same data, because we're going to use it throughout the section. 32 00:01:35,390 --> 00:01:40,430 There will be a couple of activities and questions, and it will be much easier if you have the same 33 00:01:40,430 --> 00:01:41,360 data as me. 34 00:01:41,870 --> 00:01:45,290 So we've got one, two, three, four, five, six, seven cats. 35 00:01:46,070 --> 00:01:49,670 Each one has a name, a breed at an age, some of them. 36 00:01:49,670 --> 00:01:56,030 There's a couple of Maine --, a couple of tabbies, and a couple that have the same age, which 37 00:01:56,030 --> 00:01:58,070 we will use in just a little bit. 38 00:01:58,160 --> 00:02:00,680 So copy this. 39 00:02:00,680 --> 00:02:04,250 Or if you're a masochist, you can type it out, paste it in. 40 00:02:06,470 --> 00:02:07,250 Perfect. 41 00:02:07,550 --> 00:02:10,310 And now we have seven cats in our database. 42 00:02:10,310 --> 00:02:11,410 Seven rose. 43 00:02:11,940 --> 00:02:14,090 Okay, so now we've prepped our data. 44 00:02:14,090 --> 00:02:20,630 We've deleted the original cat's table, remade a new special cat's table with some more interesting 45 00:02:20,630 --> 00:02:21,500 pieces of data. 46 00:02:21,500 --> 00:02:23,660 And then we've inserted data in there as well. 47 00:02:24,110 --> 00:02:24,710 Awesome. 48 00:02:24,740 --> 00:02:28,850 Next, we're going to move on to talking about searching or reading data out.