Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,460 --> 00:00:04,460
In this lesson, we want to
look at SQL Developer, which
2
00:00:04,460 --> 00:00:08,690
is Oracle's newer, de facto
standard tool for addressing
3
00:00:08,690 --> 00:00:09,650
a database.
4
00:00:09,650 --> 00:00:14,270
So as a database administrator,
as a developer, even as a user,
5
00:00:14,270 --> 00:00:16,550
we need to have
some kind of tool
6
00:00:16,550 --> 00:00:18,500
that allows us to
connect to a database
7
00:00:18,500 --> 00:00:20,010
and work with the data.
8
00:00:20,010 --> 00:00:24,170
And today, that de facto
standard is SQL Developer.
9
00:00:24,170 --> 00:00:28,520
However, up until very recently,
Oracle used another standard
10
00:00:28,520 --> 00:00:30,860
tool called SQL*Plus.
11
00:00:30,860 --> 00:00:34,790
SQL*Plus goes back a long
way, has a venerable history.
12
00:00:34,790 --> 00:00:36,860
However, we'll see
some reasons, I
13
00:00:36,860 --> 00:00:40,130
think, here, when we take a look
at it that SQL Developer can
14
00:00:40,130 --> 00:00:43,300
be preferable in many ways.
15
00:00:43,300 --> 00:00:46,750
Open a terminal window.
16
00:00:46,750 --> 00:00:50,980
Now, SQL*Plus-- even though it
is a command line-based tool,
17
00:00:50,980 --> 00:00:53,530
it has not gone
completely out of style,
18
00:00:53,530 --> 00:00:56,290
and I do want to emphasize that
database administrators will
19
00:00:56,290 --> 00:00:59,350
definitely still use SQL*Plus
for a lot of different
20
00:00:59,350 --> 00:01:00,290
reasons--
21
00:01:00,290 --> 00:01:03,850
mostly, the ability to be
on a server with something
22
00:01:03,850 --> 00:01:08,380
like Secure Shell and to connect
to the database internally
23
00:01:08,380 --> 00:01:10,330
rather than through a network.
24
00:01:10,330 --> 00:01:13,990
However, there's a lot of things
that SQL Developer will do
25
00:01:13,990 --> 00:01:16,030
better than SQL*Plus.
26
00:01:16,030 --> 00:01:17,580
So let's look at it here.
27
00:01:17,580 --> 00:01:19,500
It's just a Command Line tool--
28
00:01:19,500 --> 00:01:24,810
SQL*Plus and the user
name and the password.
29
00:01:24,810 --> 00:01:29,590
So SQL*Plus is a command
line line-based tool.
30
00:01:29,590 --> 00:01:36,440
So whenever we type
statements, we get line numbers
31
00:01:36,440 --> 00:01:37,790
that we can reference.
32
00:01:37,790 --> 00:01:41,200
So an l will list those out.
33
00:01:41,200 --> 00:01:43,970
l2 will list the second line.
34
00:01:43,970 --> 00:01:46,450
So it can have a learning
curve when it comes
35
00:01:46,450 --> 00:01:48,880
to learning to deal with that.
36
00:01:48,880 --> 00:01:54,230
And even when you don't do it
that way, the results you get
37
00:01:54,230 --> 00:01:57,440
can be difficult to understand--
38
00:01:57,440 --> 00:01:59,840
or at least get a handle
on with the wrapping
39
00:01:59,840 --> 00:02:02,090
that's involved in
the terminal screen.
40
00:02:02,090 --> 00:02:05,240
So we're selecting all the
columns from the Employees
41
00:02:05,240 --> 00:02:07,070
table, and yet
it's very difficult
42
00:02:07,070 --> 00:02:09,200
to find what we're
looking for when we're
43
00:02:09,200 --> 00:02:11,640
looking for a particular row.
44
00:02:11,640 --> 00:02:15,100
So that's just an
example of SQL*Plus.
45
00:02:15,100 --> 00:02:19,030
What we want to do now
is look at SQL Developer
46
00:02:19,030 --> 00:02:20,710
and why we might like
it a little more.
47
00:02:24,630 --> 00:02:26,940
First and foremost,
SQL Developer
48
00:02:26,940 --> 00:02:30,300
is completely free and
downloadable from Oracle.
49
00:02:30,300 --> 00:02:33,780
So anytime you want to
use it, there's no charge.
50
00:02:33,780 --> 00:02:36,510
You download it from the
Oracle Technology Network.
51
00:02:36,510 --> 00:02:39,630
It's very simple in that it
doesn't even have an installer.
52
00:02:39,630 --> 00:02:42,120
You just unzip it
and run it, and it
53
00:02:42,120 --> 00:02:45,570
has a self-contained
Java virtual machine Java
54
00:02:45,570 --> 00:02:46,920
environment that it runs from.
55
00:02:46,920 --> 00:02:49,750
So it's a fully Java-based tool.
56
00:02:49,750 --> 00:02:53,460
It's also included in the Oracle
Server installation package.
57
00:02:53,460 --> 00:02:57,100
So when you install a
database on an Oracle server,
58
00:02:57,100 --> 00:03:00,240
you will get the SQL
Developer tool with it
59
00:03:00,240 --> 00:03:03,450
to run either on the
server if you install it
60
00:03:03,450 --> 00:03:06,660
as a client package on
your workstation machine.
61
00:03:06,660 --> 00:03:09,030
Any of those will include
SQL Developer, because it
62
00:03:09,030 --> 00:03:11,370
is the new default standard.
63
00:03:11,370 --> 00:03:15,360
SQL*Plus will not be included
on any client-side type
64
00:03:15,360 --> 00:03:17,310
of installation
that you would do.
65
00:03:17,310 --> 00:03:20,220
SQL*Plus is still available from
the Command Line on a server
66
00:03:20,220 --> 00:03:23,890
installation, but not a
workstation installation.
67
00:03:23,890 --> 00:03:26,850
Another benefit of SQL
Developer is that it
68
00:03:26,850 --> 00:03:29,380
is completely cross-platform.
69
00:03:29,380 --> 00:03:30,660
It's written in Java.
70
00:03:30,660 --> 00:03:35,070
It's available on Unix,
Windows, Linux, Mac--
71
00:03:35,070 --> 00:03:38,070
any platform on which
we can run Oracle
72
00:03:38,070 --> 00:03:39,930
will include SQL Developer.
73
00:03:39,930 --> 00:03:42,780
And even better, the SQL
Developer application
74
00:03:42,780 --> 00:03:45,300
that we run will look the same.
75
00:03:45,300 --> 00:03:46,770
It will look the
same on Windows.
76
00:03:46,770 --> 00:03:49,420
It will look the
same on Linux, Unix--
77
00:03:49,420 --> 00:03:50,430
whatever.
78
00:03:50,430 --> 00:03:54,420
So it has a true
cross-platform benefit to it.
79
00:03:54,420 --> 00:03:58,350
A lot of the other database
administration tools for Oracle
80
00:03:58,350 --> 00:04:00,570
are only available on Windows.
81
00:04:00,570 --> 00:04:02,310
SQL Developer has
this commitment
82
00:04:02,310 --> 00:04:06,180
to cross-platform
nature, Java, and so it's
83
00:04:06,180 --> 00:04:08,730
available on the other
platforms as well.
84
00:04:08,730 --> 00:04:10,470
Another benefit of
SQL Developer is
85
00:04:10,470 --> 00:04:13,860
that it's kind of the right
tool for the right job.
86
00:04:13,860 --> 00:04:17,010
A number of the other
Oracle-based tools--
87
00:04:17,010 --> 00:04:19,740
administration tools,
developer tools--
88
00:04:19,740 --> 00:04:22,710
they tend to be
everything in one basket.
89
00:04:22,710 --> 00:04:25,980
So because they charge
for these products,
90
00:04:25,980 --> 00:04:29,130
they tend to have tremendous
amounts of features.
91
00:04:29,130 --> 00:04:31,680
And so if you're a
database administrator
92
00:04:31,680 --> 00:04:33,840
and your organization
is trying to standardize
93
00:04:33,840 --> 00:04:36,990
on what tool that
developers should use
94
00:04:36,990 --> 00:04:40,590
and you pick one that
has more capabilities
95
00:04:40,590 --> 00:04:43,770
than the developers really
need, such as the ability
96
00:04:43,770 --> 00:04:47,550
to accidentally drop tables
with a click of a button,
97
00:04:47,550 --> 00:04:49,300
that can be really problematic.
98
00:04:49,300 --> 00:04:52,950
And I've had that
experience as a DBA as well.
99
00:04:52,950 --> 00:04:55,770
Tables began disappearing,
and eventually you
100
00:04:55,770 --> 00:04:58,230
find out it was mistakes
made with the tool.
101
00:04:58,230 --> 00:05:00,780
So SQL Developer-- it
still has the ability
102
00:05:00,780 --> 00:05:04,290
to do damage, if you will,
but not the kind of damage
103
00:05:04,290 --> 00:05:07,380
that other administration
tools might have on the market.
104
00:05:07,380 --> 00:05:10,230
So it's sort of the right
tool for the right job.
105
00:05:10,230 --> 00:05:12,450
It's very good at
doing development--
106
00:05:12,450 --> 00:05:15,430
so writing PL/SQL
code, writing SQL code,
107
00:05:15,430 --> 00:05:16,710
those types of things--
108
00:05:16,710 --> 00:05:20,220
doing very, very basic
administration types of things.
109
00:05:20,220 --> 00:05:22,230
So that's another benefit of it.
110
00:05:22,230 --> 00:05:24,270
It also supports
read-only connections
111
00:05:24,270 --> 00:05:26,820
to a lot of other RDBMS systems.
112
00:05:26,820 --> 00:05:29,880
So you can use SQL Developer
with the right plug-in
113
00:05:29,880 --> 00:05:34,860
to connect to SQL
Server, Sybase, MySQL,
114
00:05:34,860 --> 00:05:39,150
Microsoft Access, or IBM's Db2.
115
00:05:39,150 --> 00:05:41,940
SQL Developer, because
of its open nature,
116
00:05:41,940 --> 00:05:45,090
being written in Java,
also has the benefit
117
00:05:45,090 --> 00:05:47,310
of third-party extensions.
118
00:05:47,310 --> 00:05:51,600
So it's very open in its
architecture, and so it is--
119
00:05:51,600 --> 00:05:53,370
if you have the skills--
120
00:05:53,370 --> 00:05:57,850
very easy to write extensions
to the software itself.
121
00:05:57,850 --> 00:06:00,240
So if SQL Developer
doesn't do something
122
00:06:00,240 --> 00:06:02,610
that you want it to
do, you can either
123
00:06:02,610 --> 00:06:04,710
search out on the
web to see if someone
124
00:06:04,710 --> 00:06:06,840
has written an extension
that does that,
125
00:06:06,840 --> 00:06:09,200
or you can write it yourself.
126
00:06:09,200 --> 00:06:11,140
So let's take a
little bit of a tour,
127
00:06:11,140 --> 00:06:13,570
here, through SQL Developer.
128
00:06:13,570 --> 00:06:16,640
Over here on the left side,
we see our connection frames.
129
00:06:16,640 --> 00:06:19,690
We're going to refer to
frames here on the screen.
130
00:06:19,690 --> 00:06:21,520
And that's going to
list all the connections
131
00:06:21,520 --> 00:06:23,180
we have to a database.
132
00:06:23,180 --> 00:06:27,490
We don't have any connections,
so we click New Connection.
133
00:06:27,490 --> 00:06:32,130
I'm going to call this hr@orcl
is the connection name.
134
00:06:32,130 --> 00:06:34,780
User name HR.
135
00:06:34,780 --> 00:06:39,110
Password-- save the password.
136
00:06:39,110 --> 00:06:44,850
Change the SID to
orcl, and test.
137
00:06:44,850 --> 00:06:51,680
We see a status of Success,
so we save, and connect.
138
00:06:51,680 --> 00:06:54,950
So now we have our
connection saved over here.
139
00:06:54,950 --> 00:06:58,730
We also have our environment
over here to do coding,
140
00:06:58,730 --> 00:07:00,510
and we'll look at
that in just a second.
141
00:07:00,510 --> 00:07:06,270
Before we do, let's click
this little plus besides HR.
142
00:07:06,270 --> 00:07:10,230
And so it's going to give us a
nice GUI breakdown of tables,
143
00:07:10,230 --> 00:07:12,870
views, packages, PL/SQL--
144
00:07:12,870 --> 00:07:15,840
all of these things
that we definitely need.
145
00:07:15,840 --> 00:07:19,240
So if we click a plus
next to the tables,
146
00:07:19,240 --> 00:07:21,180
here's the tables that
are available to us
147
00:07:21,180 --> 00:07:24,800
when we log in as the HR user.
148
00:07:24,800 --> 00:07:28,010
Over on the right side is what
we call the SQL worksheet,
149
00:07:28,010 --> 00:07:29,420
and it has two areas.
150
00:07:29,420 --> 00:07:31,580
We only see one of
these right now.
151
00:07:31,580 --> 00:07:34,770
But the area that we're looking
at here is the working area.
152
00:07:34,770 --> 00:07:38,730
So this is the area where
we'd actually type in code.
153
00:07:38,730 --> 00:07:41,830
We might say select * from--
154
00:07:41,830 --> 00:07:44,300
and as we type, it
gives us the ability
155
00:07:44,300 --> 00:07:48,550
to choose different
objects, views.
156
00:07:48,550 --> 00:07:52,330
And we'll go ahead
and continue to type.
157
00:07:52,330 --> 00:07:55,580
When we're ready to execute,
we just click this button here,
158
00:07:55,580 --> 00:07:58,890
which is Run Statement.
159
00:07:58,890 --> 00:08:02,340
And then we get the next frame,
which is the Results frame.
160
00:08:02,340 --> 00:08:05,440
So this takes the
results from our query--
161
00:08:05,440 --> 00:08:08,010
which we just want to see
all the rows in the Employees
162
00:08:08,010 --> 00:08:08,880
table--
163
00:08:08,880 --> 00:08:11,520
and it puts them
out nicely onscreen.
164
00:08:11,520 --> 00:08:15,210
When it's too many columns
to show on a single screen,
165
00:08:15,210 --> 00:08:18,390
we just have the ability
to scroll over to see it.
166
00:08:18,390 --> 00:08:21,630
If there are a lot of
records, we just scroll down.
167
00:08:24,320 --> 00:08:27,480
And that, in a nutshell,
is why it's better
168
00:08:27,480 --> 00:08:31,110
to use SQL Developer-- because
the ability to see the data,
169
00:08:31,110 --> 00:08:37,180
to easily edit the
data or the queries,
170
00:08:37,180 --> 00:08:39,790
and just be more
productive in general.
13844
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.