Database Reference
In-Depth Information
Here, we have chosen a
BookId
field as the primary key on which the complete item
would get indexed. We have also included a couple of sample items that have multiple at-
tributes. Some of them have string as their data type, some have number, whereas some
others are multivalued attributes. You can also observe that the number of attributes in
given items need not be the same. The first item has the
chapters
attribute, while the
second item does not have it. This is because we don't have
strict
schema in NoSQL data-
bases.
Also, both the items have
bookId
as the primary key, which needs to be unique for each
attribute. Now let's try to understand more about primary keys in DynamoDB.