Your cart is currently empty!
Category: dynamodb
-
Khóa học miễn phí DynamoDB – Data Types nhận dự án làm có lương
DynamoDB – Data Types
Data types supported by DynamoDB include those specific to attributes, actions, and your coding language of choice.
Attribute Data Types
DynamoDB supports a large set of data types for table attributes. Each data type falls into one of the three following categories −
-
Scalar − These types represent a single value, and include number, string, binary, Boolean, and null.
-
Document − These types represent a complex structure possessing nested attributes, and include lists and maps.
-
Set − These types represent multiple scalars, and include string sets, number sets, and binary sets.
Remember DynamoDB as a schemaless, NoSQL database that does not need attribute or data type definitions when creating a table. It only requires a primary key attribute data types in contrast to RDBMS, which require column data types on table creation.
Scalars
-
Numbers − They are limited to 38 digits, and are either positive, negative, or zero.
-
String − They are Unicode using UTF-8, with a minimum length of >0 and maximum of 400KB.
-
Binary − They store any binary data, e.g., encrypted data, images, and compressed text. DynamoDB views its bytes as unsigned.
-
Boolean − They store true or false.
-
Null − They represent an unknown or undefined state.
Document
-
List − It stores ordered value collections, and uses square ([…]) brackets.
-
Map − It stores unordered name-value pair collections, and uses curly ({…}) braces.
Set
Sets must contain elements of the same type whether number, string, or binary. The only limits placed on sets consist of the 400KB item size limit, and each element being unique.
Action Data Types
DynamoDB API holds various data types used by actions. You can review a selection of the following key types −
-
AttributeDefinition − It represents key table and index schema.
-
Capacity − It represents the quantity of throughput consumed by a table or index.
-
CreateGlobalSecondaryIndexAction − It represents a new global secondary index added to a table.
-
LocalSecondaryIndex − It represents local secondary index properties.
-
ProvisionedThroughput − It represents the provisioned throughput for an index or table.
-
PutRequest − It represents PutItem requests.
-
TableDescription − It represents table properties.
Supported Java Datatypes
DynamoDB provides support for primitive data types, Set collections, and arbitrary types for Java.
Khóa học lập trình tại Toidayhoc vừa học vừa làm dự án vừa nhận lương: Khóa học lập trình nhận lương tại trung tâm Toidayhoc
-
Khóa học miễn phí DynamoDB – Environment nhận dự án làm có lương
DynamoDB – Environment
The DynamoDB Environment only consists of using your Amazon Web Services account to access the DynamoDB GUI console, however, you can also perform a local install.
Navigate to the following website −
Click the “Get Started with Amazon DynamoDB” button, or the “Create an AWS Account” button if you do not have an Amazon Web Services account. The simple, guided process will inform you of all the related fees and requirements.
After performing all the necessary steps of the process, you will have the access. Simply sign in to the AWS console, and then navigate to the DynamoDB console.
Be sure to delete unused or unnecessary material to avoid associated fees.
Local Install
The AWS (Amazon Web Service) provides a version of DynamoDB for local installations. It supports creating applications without the web service or a connection. It also reduces provisioned throughput, data storage, and transfer fees by allowing a local database. This guide assumes a local install.
When ready for deployment, you can make a few small adjustments to your application to convert it to AWS use.
The install file is a .jar executable. It runs in Linux, Unix, Windows, and any other OS with Java support. Download the file by using one of the following links −
-
Tarball −
-
Zip archive −
Note − Other repositories offer the file, but not necessarily the latest version. Use the links above for up-to-date install files. Also, ensure you have Java Runtime Engine (JRE) version 6.x or a newer version. DynamoDB cannot run with older versions.
After downloading the appropriate archive, extract its directory (DynamoDBLocal.jar) and place it in the desired location.
You can then start DynamoDB by opening a command prompt, navigating to the directory containing DynamoDBLocal.jar, and entering the following command −
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
You can also stop the DynamoDB by closing the command prompt used to start it.
Working Environment
You can use a JavaScript shell, a GUI console, and multiple languages to work with DynamoDB. The languages available include Ruby, Java, Python, C#, Erlang, PHP, and Perl.
In this tutorial, we use Java and GUI console examples for conceptual and code clarity. Install a Java IDE, the AWS SDK for Java, and setup AWS security credentials for the Java SDK in order to utilize Java.
Conversion from Local to Web Service Code
When ready for deployment, you will need to alter your code. The adjustments depend on code language and other factors. The main change merely consists of changing the endpoint from a local point to an AWS region. Other changes require deeper analysis of your application.
A local install differs from the web service in many ways including, but not limited to the following key differences −
-
The local install creates tables immediately, but the service takes much longer.
-
The local install ignores throughput.
-
The deletion occurs immediately in a local install.
-
The reads/writes occur quickly in local installs due to the absence of network overhead.
Khóa học lập trình tại Toidayhoc vừa học vừa làm dự án vừa nhận lương: Khóa học lập trình nhận lương tại trung tâm Toidayhoc