1
votes

Ok, Google App Engine got a function so called "Datastore". We got the following table from Google datastore website:

Concept                         Datastore            Relational database
Category of object              Kind                 Table
One object                      Entity               Row
Individual data for an object   Property             Field
Unique ID for an object         Key                  Primary key

OK, let say we got the following code:

DatastoreService ds=DatastoreServiceFactory.getDatastoreService();
Entity e1=new Entity("Person1");
e1.setProperty("First Name", "Tom");
e1.setProperty("Last Name", "Mary");
ds.put(e1);

Entity e2=new Entity("Person2");
e2.setProperty("First Name", "Brat");
e2.setProperty("Last Name", "Pit");
ds.put(e2);

My question is that:

What will happen in Google Big Table after the above code runs?

Will it create an entry like the following in Big Table?:

Person1 {First Name: Tom}; {Last Name: Mary}
Person2 {First Name: Brat}; {Last Name: Pit}

Is Big Table like a big Text file (.txt) or something like that? & when data got inserted into Big Table, then it just comes like 1 new entry in that big table?

OK, now look at the "MyProject\war\WEB-INF\appengine-generated\local_db.bin", I can see this picture enter image description here

As you can see the way app engine stores data is very weird

1

1 Answers

2
votes

What you see in local_db.bin file does not reflect the way the Datastore works. This is a file that is used to emulate Datastore - it's impossible (and unnecessary) to recreate on your computer the way the "real" Datastore works.

The real Datastore is not a giant text file. You can think of it as a giant HashMap.