Posts

Showing posts with the label uuid

Guide to Initializing and Connecting AWS DynamoDB

Image
Introduction Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability at any scale. Key benefits include: unlimited scalability, extremely low latency in milliseconds, built-in security, and flexible pricing models based on usage (On-demand) to optimize costs. Detail Use AWS CDK to create the lib/dynamodb-stack.ts file import * as cdk from "aws-cdk-lib" import * as dynamodb from "aws-cdk-lib/awsf-dynamodb" import { Construct } from "constructs" export class DynamodbStack extends cdk . Stack { constructor ( scope : Construct , id : string , props ?: cdk . StackProps ) { super (scope, id, props) const productTable = new dynamodb. Table ( this , "ProductTable" , { tableName: "Products" , partitionKey: { name: "id" , type: dynamodb.AttributeType. STRING , }, billingMode: dynamodb.Bi...

Boolean, Binary and UUID Types

Image
Introduction Next, we will explore Boolean, Binary and UUID Types as follows. Boolean Type BOOLEAN is a logical data type used to store true/false states, supporting three-valued logic such as TRUE , FALSE and NULL (unknown or missing data). Storage size is 1 byte . Commonly used to toggle features, activation status and soft delete flags ( is_deleted ). Postgres supports flexible INSERT syntax, so you do not necessarily have to write TRUE or FALSE . You can use equivalent keywords such as: TRUE state: 'true', 't', 'yes', 'y', '1', 1 FALSE state: 'false', 'f', 'no', 'n', '0', 0 Binary Data Types BYTEA (byte array) is used to store raw binary data without text processing, such as image files, PDF files, audio files, encryption certificates, RSA keys and more. Storage size is highly flexible. For short binary strings: Data size + 1 byte overhead. For long binary strings (over 2 KB): Uses compression ...