While learning Apache Gora, I have come to know the term data bean. Is it can be considered a data structure to hold the data or is something else.
Moreover, a similar term exist "Java beans". Is it same as data bean ? What's the difference between these three terms ?
Data beans are the main way to hold the data in memory and persist in Gora.
Structure wise if you see Gora data beans look similar to java beans, but some AVRO specific differences as follows
These data beans contains Embedded Avro Schema declaration and an inner enum named Field. Theese enum will come in handy when we query the datastore for specific fields
Uses Utf8 class as a placeholder for string fields
After reading the Java Beans definition at wiki "JavaBeans are classes that encapsulate many objects into a single object (the bean). They are serializable, have a zero-argument constructor, and allow access to properties using getter and setter methods. The name "Bean" was given to encompass this standard, which aims to create reusable software components for Java"
I could not see any difference in data beans and java beans apart from the context in which both are used i.e. data beans as the name suggest to hold data in Gora and java beans to hold objects in java.
And data structure is nothing but a way of organizing data in programs or computer so that it can be used effectively.
Example of Data Bean Structure in GORA