Hive Database Creation & Usage
2K views
Oct 24, 2024
Hive Database Creation & Usage Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Arnab Chakraborty, Tutorials Point India Private Limited
View Video Transcript
0:00
In this video we are discussing database creation and its usage
0:05
So, we shall show you that what are the commands to be issued to create one database and
0:10
how to use that one. So, how to create database? So, in height there is a default database
0:17
And we can create a new database using the command that is a create database and then
0:23
database name. Then we can put one semicolon after that. So create database database name semicolon
0:30
with help of which you can create a new database, otherwise also you can work with the default one
0:35
To switch to the database from the default to the newly created database, the command will be used
0:41
and that very database name which was used while creating the database
0:46
So the command will be used database name and semicolon. And obviously, these commands are to be executed
0:53
So start Hadoop first to run all these commands, then only the commands will be executed
0:58
So let us go for one practical. demonstration to show you that how to create and use these databases in practical At first we shall start Hadoop So control altered T to initiate one new terminal here
1:16
So to start Hadoop, we should type dollar Hadoop underscore install all in capital letters slash has been slash start hyphen
1:26
slash start hyphen all dot sH so this is a shell program which are which is supposed to get
1:36
executed to start Hadoop on our system now to check whether Hadoop is executing properly
1:46
or not we are executing the command JPS and you can find that node manager name node
1:53
resource manager secondary name node and data node all the processes are executing now
1:59
we shall initiate our GUI interface of Hadoop so we are opening our browser in the URL we are typing local host local host colon 50070 slash
2:21
You see the name node related information is coming here. All the name node related information they are coming
2:29
So Hadobe is operating fine. You can go for utilities, you can go for browse the file system and all the default folders
2:38
files are coming here so that indicates that my Hadoop is executing perfectly it
2:44
has got loaded and initiated into the memory now at first we shall initiate
2:49
one terminal so we are pressing here we are using control alter and T so one
2:56
terminal will be opened and here to load this hive so we shall go for HIV so
3:04
you give writing this hive here so you can find that the HIP
3:08
prompt will be coming here so we shall go for creation of a new database in this hype environment and you see the hype prompt has come and we shall create a new database and the name of the database will be my database so in that case we shall issue the command there is a create database there is a create database my
3:31
database okay so I've given this one and at the end of the command I should
3:37
give the semicolon so you see the database has got created so
3:44
now I shall go for use database name so my database if I press enter give the
3:54
semicolon here here you see we have we have logged into this particular my
3:59
database we're using this one so now if you create any table if you issue any
4:03
commands here now it will be operating on this my database so in this
4:08
demonstration we have shown you that how to create one database so here the
4:13
database name is my database database and how to use it so the next time when you shall go for any table creation
4:19
insertion of records and all and that will be done on this my database only
4:24
thanks for watching this video
#Enterprise Technology
#Programming
#Software