WEBVTT

00:00.420 --> 00:06.520
OK so before we see any new code or new commands I want to clean up the data that we currently have.

00:06.750 --> 00:12.090
If you remember we kind of added a bunch of different cats databases of cats and cats 1 and Cat 2 and

00:12.090 --> 00:13.840
Cat 3 and so on.

00:13.910 --> 00:19.810
But I want to do is delete the original catch table and then we're going to remake it.

00:20.010 --> 00:25.100
But with a few additions because our original cat's table was the most basic.

00:25.170 --> 00:27.220
It only had name and age.

00:27.570 --> 00:31.220
But I want to add some other data in like an ID that autoincrement and so on.

00:31.440 --> 00:34.910
So basically we're just going to remake the cat table and add new data in.

00:35.220 --> 00:39.900
So if you want to make a bit of an exercise out of this the first step would be to delete the catch

00:39.900 --> 00:40.910
table.

00:41.010 --> 00:47.100
So do that now and the command if you want to see it is drop table cat.

00:47.400 --> 00:48.240
So let's do it.

00:48.450 --> 00:50.710
Drop table cats.

00:53.370 --> 00:54.820
There we go.

00:54.830 --> 00:59.780
Now that we've dropped the table we want to recreate the table.

00:59.860 --> 01:01.560
So this is what we want here.

01:01.630 --> 01:08.710
We're going to have a cat ID integer not know autoincrement really have a name that Safar char a breed

01:08.830 --> 01:14.080
that's our char as well and age that is an integer and cat ID is our primary key.

01:14.080 --> 01:20.550
So if you'd like go ahead and type that out or just copy paste it in perfect.

01:20.620 --> 01:22.480
Of course we could make sure it worked.

01:22.510 --> 01:24.400
Describe cats.

01:24.400 --> 01:25.870
There we go.

01:25.870 --> 01:26.590
All right.

01:26.590 --> 01:29.890
So the last step here is to add new data.

01:30.480 --> 01:35.330
And I would like for you to have this same data because we're going to use it throughout the section.

01:35.410 --> 01:40.660
There'll be a couple of activities and questions and it will be much easier if you have the same data

01:40.690 --> 01:41.950
as me.

01:42.010 --> 01:45.580
So we've got one two three four five six seven cats.

01:46.120 --> 01:49.110
Each one has a name breed and age.

01:49.210 --> 01:55.990
Some of them there's a couple of Maine Coons couple of Tabby's and a couple that have the same age which

01:55.990 --> 01:58.340
we will use in just a little bit.

01:58.360 --> 02:07.310
So copy this or if you're a masochist you can type it out paste it in perfect.

02:07.730 --> 02:10.290
And now we have seven cats in our database.

02:10.370 --> 02:11.410
Seven rows.

02:11.720 --> 02:12.360
OK.

02:12.470 --> 02:14.080
So now we've prepped our data.

02:14.150 --> 02:20.960
We've deleted the original catch table remade new special cats table with some more interesting pieces

02:20.960 --> 02:24.150
of data and then we've inserted data in there as well.

02:24.150 --> 02:24.940
Awesome.

02:24.950 --> 02:28.640
Next we're going to move on to talking about searching or reading data out.
