Data Scan and Read
117K views
Oct 26, 2024
Data Scan and Read
View Video Transcript
0:00
In this video we are going to discuss data scan and read operations on edge base
0:07
So, what is scanned from a table? The scan command is used to view the data in edge base table and using the scan command
0:15
we can get the table data. So, what is the syntax of issuing this scan command
0:20
So, syntax will be scan, then only the table name. So to view the student table data, we should use the line that is scan student
0:30
Next, how to read data from the edge base table. The command will be get
0:38
The get command is used to read data from table in edge base and using get command you
0:43
can get a single row of data at a time. So, syntax will be get table name and then the row number
0:52
So we can select a single column. You are also using the get command, the syntax will be like this, that is the get table
0:59
name, Roanum and then within Calibruses column implies column underscore family colon column
1:08
name So and then the Calibrase will get completed So in this way using this get command you can select a single column So like this one you can select a single column using the get command and you can print it So let us go for one practical demonstration for the easy understanding of the issuing of such commands
1:28
Now we shall give you the demonstration on the data scanning and reading. So already we have created one table. The name of the table is student and which is having two column families
1:40
one is the college data another one is the personal data so now if we execute the command
1:46
that is a scan student and if i press enter you can find we're having the rows so row
1:54
number one we're having there's a first student details then second details to a student
1:59
details and the third student details we're having so that is a column college data stream
2:05
so timestamp will be there and then value computer science then college data is
2:10
time time will be there and then value second personal data city we're having
2:15
timestamp value there and then value lock now and then personal data name
2:21
we having timestamp value is there and then value is equal to ovishak and that is for the first student and in this way we have entered the three different students details here so there is a row number one row number two and row number three so that is coming
2:36
and this is our column plus cell value so in this way you can get this idea that whatever we
2:42
entered we are getting them right in front of us okay so the command is here scan and the
2:49
and the database name and the table name okay now if i want to get now to get now to get
2:55
the data of the row two only for row two we can do that one using the command that is a
3:01
gate student obviously student must be within single quotes and then two comma
3:07
and two should be also in the single quotes you can find we have got the only
3:14
the second row details there is the second student details and that is a and stream is
3:19
pharix year is third city is Kolkata and name is Shibham and here we have
3:25
having the timestamp value also. Okay. So now if I want to get the city field for a
3:33
given row, say row number three, I want to get only the city field for the student number three
3:40
So how to get it So here we shall go for this get and then student must be within the single course and then comma then we be having our three then comma then
3:51
curly press then go for column I'm making this one as personal data
4:00
whatever you typed and I require only the city there so I require the
4:06
city for a given row here the row number is our 3 so that is the end of the command so let us check once so get student three
4:17
means for the row number three for the third student and column we're going to have
4:22
only the personal data colon city so if I press enter what the value we're
4:28
getting the value we're getting is Delhi because the third student is having the
4:33
respective city as Delhi so that has been picked up so it is picking up the
4:38
data for the third student so you are going for if you go go for the conception of that
4:44
database we are going for this selection but we want to retrieve only the value for
4:49
the city and we are doing the projection here so you are getting a flavor of
4:54
selection and projection how to do this one in our age base we have shown that one
4:58
thanks for watching this video
#Data Management
#Programming