In this video we are discussing Pig Latin data model
We know that Pig Latin is a high-level language which is available with Pig
So, Pig Latin data model we are going to discuss. We shall discuss it with one diagram and some explanations
Just consider this diagram. So here we are having the bag and we are having the tuple
You can find that this is this row will be known as a tappel. And this is a bag
So bag is consisting of multiple tuples. here it is a field and there is a field value
So the data model of pig Latin, the data model of peak Latin is fully nested and it allows
complex non-atomic data types. So this Pig Latin data model supports complex non-atomic data types
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
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
diagrammatical representation of P.Glatin's data model. So let us discuss all these
terminology is one by one. So at first we are starting with this atom. A single value in
P-Gillatin irrespective of the data is known as atom. So atom stores as a string and this
can be used as string and number. So, atom is a single value at a time and it can be
it will be stored in the form of string and can be operated as a string or a number
A piece of data or a simple atomic value is known as a field. As an example, a shame can
be considered as an atom. Next, we are going for the tapple. Now, what is a tappell? A record
which is formed by an ordered set of fields is known as a tappel
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
of a tuple next we are going for the bag the collection of tuples will be known as a bag
and each tuple can have any number of fields a bag is represented within curly braces
a bag will be represented within corley braces as an example we can consider that within
carly braces were having one tuple that is a shim comma 25 another tappell Rahul
30 another topple hovishek comma 23 so bag is nothing but collection of tuples and should
be enclosed within curly braces next one we are going for this map a map or data map is a set of
key value pairs it is a set of key value pairs the key needs to be of type character
array and should be unique. The key should have some unique values there. And the value might be
of any type and it can be represented or it should be represented within square brackets
You can find that as an example, name number is head or sheim and age number is our 25
And it has been enclosed within third brackets, within the square brackets. That means it is
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
Next one we are having the relation. Now, what is a deletion? A relation is a bag of tuples
and the relations in pig latin are unordered and there is no guarantee that tuples are processed
in any particular order and that is known as a relation. So the relation is a bag of tuples
actually. So, now this is the concept and this is the Pig Latin data model and we have
discussed all the respective terminologies into more details for your better understanding
Thanks for watching this video