This online bookstore runs on a non-relational, DynamoDB database, where data is stored and retrieved through the AWS SDK for Java. It is an adaptation of Amazon's online bookstore application that was written in Python (using Boto 3). Although simpler in Python, this project was done in Java to play around with the AWS SDK for Java, and to compare the differences between the Python and Java implementations.
The usage of a DynamoDB database is important for this project because it is an online bookstore that can have a wide variety of books stored. Therefore, DynamoDB's low-latency performance and scaling-capabilities are highly desired.
- Author (the author of the book) - String
- Title (the title of the book) - String
- Category (the category of the book) - String
- Formats (the available formats of the book (hardcopy, paperback, audiobook) and their corresponding ids) - Map
- The DynamoDB table (bookstore) was created, with the appropriate primary key (author + title) and attribute definitions.
- A global secondary index (on the category attribute) was added to the table.
- Items (books) were then loaded into the table.
- It was made possible to retrieve multiple items based on the hash key (author).
- It was made possible to query by the secondary index (category).
- It was made possible to update any item in the table.
- The DynamoDB table was deleted to free the AWS resources used.