SimpleDB element name

I just started working with Amazon SimpleDB (the first experience with noSQL), and having set my first user domain and adding the first element (with identifier and attribute name), I wondered what the name of the element should be?

  • Like RDBMS Idam: "1", "2", "3" (so I have to store the account somewhere).
  • UUIDs
  • More readable: "user_1", "user_2"

Will I most often request an item name? in this case, is the element name equivalent to id, so I don't need the id attribute?

+4
source share
1 answer

Amazon SimpleDB simply requires a unique identifier for each row in your database. The item name must be unique, like your pk in your traditional database. When you request any data in Amazon SimplDB, you will get a list of items as hits.

The element name is not an attribute, but if you plan to add any new domain / table to Amazon SimpleDB, and your any attribute will contain any unique data, you can replace your attribute with the element name.

What should be the name of the element?

This is for you what you really would save as the name of the element. You can save among all three that you suggested, but it should be unique data, such as pk in your traditional database.

Will I most often request an item name? in this case, this element name is equivalent to id, so I don't need the id attribute?

Yes. You can request your data using the element name, for example -

select * from domain where itemName() = '1' 
+2
source

All Articles