Pig Latin Data Model
73K views
Oct 26, 2024
Pig Latin Data Model
View Video Transcript
0:00
In this video we are discussing Pig Latin data model
0:04
We know that Pig Latin is a high-level language which is available with Pig
0:09
So, Pig Latin data model we are going to discuss. We shall discuss it with one diagram and some explanations
0:16
Just consider this diagram. So here we are having the bag and we are having the tuple
0:21
You can find that this is this row will be known as a tappel. And this is a bag
0:25
So bag is consisting of multiple tuples. here it is a field and there is a field value
0:32
So the data model of pig Latin, the data model of peak Latin is fully nested and it allows
0:40
complex non-atomic data types. So this Pig Latin data model supports complex non-atomic data types
0:48
What are they? So they can be a map and a tipple. You can find that this is a tipple and then what is a map
0:54
Map means collection of key value pairs. that map and double can be considered as complex non-atomic data types. So the above is the
1:03
diagrammatical representation of P.Glatin's data model. So let us discuss all these
1:09
terminology is one by one. So at first we are starting with this atom. A single value in
1:16
P-Gillatin irrespective of the data is known as atom. So atom stores as a string and this
1:24
can be used as string and number. So, atom is a single value at a time and it can be
1:30
it will be stored in the form of string and can be operated as a string or a number
1:36
A piece of data or a simple atomic value is known as a field. As an example, a shame can
1:43
be considered as an atom. Next, we are going for the tapple. Now, what is a tappell? A record
1:49
which is formed by an ordered set of fields is known as a tappel
1:54
So you can find that this atomic value is also known as a field and then ordered set of fields will form one tuple as an example you can consider or shim comma 25 is an example
2:05
of a tuple next we are going for the bag the collection of tuples will be known as a bag
2:12
and each tuple can have any number of fields a bag is represented within curly braces
2:18
a bag will be represented within corley braces as an example we can consider that within
2:24
carly braces were having one tuple that is a shim comma 25 another tappell Rahul
2:29
30 another topple hovishek comma 23 so bag is nothing but collection of tuples and should
2:35
be enclosed within curly braces next one we are going for this map a map or data map is a set of
2:44
key value pairs it is a set of key value pairs the key needs to be of type character
2:50
array and should be unique. The key should have some unique values there. And the value might be
2:56
of any type and it can be represented or it should be represented within square brackets
3:02
You can find that as an example, name number is head or sheim and age number is our 25
3:11
And it has been enclosed within third brackets, within the square brackets. That means it is
3:16
representing a map here. So map is nothing but collection of key value pairs, key will have the distinct values and values can have of different data types
3:26
Next one we are having the relation. Now, what is a deletion? A relation is a bag of tuples
3:31
and the relations in pig latin are unordered and there is no guarantee that tuples are processed
3:38
in any particular order and that is known as a relation. So the relation is a bag of tuples
3:46
actually. So, now this is the concept and this is the Pig Latin data model and we have
3:51
discussed all the respective terminologies into more details for your better understanding
3:57
Thanks for watching this video
#Programming