1
00:00:00,990 --> 00:00:08,670
So I'll do the Macintosh connection first, so I'm on a Mac and I have downloaded Postgrads and I dragged

2
00:00:08,670 --> 00:00:11,520
this over to my applications folder, so it's all installed.

3
00:00:11,820 --> 00:00:18,210
So I'll open my applications folder and I'll start Postgres and I'll just check automatically.

4
00:00:18,840 --> 00:00:23,790
So what I want to do now is initialize the database, so I'll initialize it by clicking the initialize

5
00:00:23,790 --> 00:00:24,120
button.

6
00:00:25,200 --> 00:00:25,830
And there we are.

7
00:00:25,980 --> 00:00:29,720
So it's now running so postcrisis running it up in the menubar.

8
00:00:29,730 --> 00:00:33,410
I have a little postgrads thing here and I can start and stop the application as necessary.

9
00:00:33,960 --> 00:00:34,820
So I've got that running.

10
00:00:34,860 --> 00:00:37,920
So let's now start De Beevor, which I also installed.

11
00:00:38,580 --> 00:00:42,830
So there's Dvir that fires up and I need to connect to my local server.

12
00:00:44,340 --> 00:00:46,850
So what I'm going to do is create a new connection.

13
00:00:47,190 --> 00:00:52,260
So let's come over here to this little button and click on it and create a connection.

14
00:00:52,260 --> 00:00:55,230
And we're going to connect to Posterous.

15
00:00:55,350 --> 00:00:56,820
There it is next.

16
00:00:58,380 --> 00:01:00,840
And I'm going to connect to localhost the database.

17
00:01:01,020 --> 00:01:08,490
I'm going to actually come to this tab and say show all databases and go back to the main and my username

18
00:01:08,490 --> 00:01:10,800
will be my username on my Mac.

19
00:01:10,800 --> 00:01:16,020
And you can see that by opening up your favorite terminal window and typing Who am I?

20
00:01:17,110 --> 00:01:18,630
And it says, I'm TKs.

21
00:01:18,840 --> 00:01:24,090
Let's go back to Deaver and I might connect using tax and leave the password empty.

22
00:01:24,090 --> 00:01:24,990
And let's try this out.

23
00:01:24,990 --> 00:01:28,110
Let's say test connection and it says connect it.

24
00:01:28,110 --> 00:01:28,560
Great.

25
00:01:29,340 --> 00:01:32,880
So I will finish and I'm connected.

26
00:01:32,910 --> 00:01:38,040
Now, when you installed this when you started for the first time, it may ask you to download some

27
00:01:38,040 --> 00:01:43,020
extra components, just choose the defaults and install them and you should be able to connect.

28
00:01:43,030 --> 00:01:43,920
So I'm now connected.

29
00:01:45,480 --> 00:01:48,900
When I click on the server name, it lists all of the databases that I have.

30
00:01:48,900 --> 00:01:52,980
So I have two databases right now, Postgres, which you can never delete.

31
00:01:52,980 --> 00:01:54,960
If you do, very bad things happen.

32
00:01:55,260 --> 00:01:57,660
And by default I created a database for me.

33
00:01:57,660 --> 00:01:59,160
TC's, that's my username.

34
00:01:59,160 --> 00:01:59,940
Your username.

35
00:01:59,970 --> 00:02:01,550
Your username will appear here.

36
00:02:01,560 --> 00:02:06,450
It won't be TC's obviously, but I actually want to create a new database and I'm going to come up here

37
00:02:06,480 --> 00:02:10,950
and choose what c I want to.

38
00:02:12,810 --> 00:02:13,080
Right.

39
00:02:13,080 --> 00:02:20,010
Click on this and choose, create a database and I'll create one for our bookings project which I will

40
00:02:20,010 --> 00:02:20,970
call bookings.

41
00:02:21,760 --> 00:02:26,430
OK, so that creates a database for me and it's an empty database.

42
00:02:26,820 --> 00:02:33,040
Every database in postgrads has a schema and the schema will be working with is the default public schema.

43
00:02:33,160 --> 00:02:37,890
OK, so inside that public schema, it'll show all the things that we have right now.

44
00:02:37,920 --> 00:02:38,760
There's nothing in this.

45
00:02:38,760 --> 00:02:39,560
It's pretty much empty.

46
00:02:39,570 --> 00:02:45,600
So if I try to look at tables, for example, there's nothing there and I can create a table by saying

47
00:02:45,600 --> 00:02:49,790
create a new table, but we'll do that after we get everyone up and running and connected to the database.

48
00:02:50,760 --> 00:02:55,920
So right now we have a database running and we can connect to it using using.

49
00:02:56,280 --> 00:03:01,920
Right now, just to be clear, if I quit out of Dvor, yes, I want to quit.

50
00:03:02,610 --> 00:03:06,660
And then I stopped the database by quitting out of postgrads or stopping the database.

51
00:03:06,660 --> 00:03:12,930
So I'll just quit it entirely if I try to connect now using Dvor, it's not going to work because the

52
00:03:12,930 --> 00:03:13,980
database is not running.

53
00:03:14,070 --> 00:03:18,090
So make sure your database is running before you try to connect to it.

54
00:03:18,510 --> 00:03:23,370
So if I try to connect to my local server postgrads, it'll say Connection refused.

55
00:03:23,880 --> 00:03:31,530
But if I start it back up by going back to Postgres, the server starting it up, it will run and now

56
00:03:31,530 --> 00:03:32,280
I can connect to it.

57
00:03:33,030 --> 00:03:35,340
And there are and there's our bookings database.

58
00:03:35,370 --> 00:03:35,790
All right.

59
00:03:36,420 --> 00:03:41,970
So I'm going to do the same thing for Windows users just to get you all connected for once on my Windows

60
00:03:41,970 --> 00:03:45,720
machine, obviously, and then we'll start playing with the actual database itself.
