Dynamo db
Class 51th AWS Dynamo db 21th
What is nosql database?
- Nosql databases are a category of database management system that differ from traditional relational database(SQL) in several key ways.
- They are designed to handle large volumes of unstructured, semi-structured, or structured data with high performance, scalability, and flexibility.
Schema Flexibility
Unlike relational databases, which require a predefined schema, Nosql databases allow for dynamic and flexible schema
Horizontal scalability
Nosql databases are designed to scale out distributing data across multiple servers or node,this contrasts with vertical scaling in relational databases,which often involves adding more resources to a single server.
High performance
They are optimized for high read and write performance, often at the expenses of strong consistency. This makes hem suitable for applications requiring low-latency data access.
Types of NoSQL
database
Key-value stores
Eample :Redis,dynamoDB
Description:Data is toed as key-value pairs ,These databases are highly performance and are used for caching session management, and real-time data processing
Document store
Example:MongoDB,CouchDB
Description:data is stored in documents(usually Json or Bson),Document stores are flexible and can handle complex, hierarchical data structure, making them suitable for content management and web applications
Column-family stores
Example:Apache Cassandra,Hbase
Description :Data is stored in columns rather than rows, and column are grouped into families.These database are optimized for read and write performance and are user in applications requiring high throughput and large scale data processing.
Graph database
Example:Neo4j,Amazon Neptune
Desciption:Data is represented as nodes,edges,and properties,graph databases are ideal for applications involving complex relationships and connections,such as social networks,recommendation engines and fraud detection
What is dynamoDB?
Amazon dynamoDB is a fully managed Nosql database service provided by Amazon webservice(AWS)that delivered high performance, scalability and reliability
It is designed to handle large amounts of data with eash and allows developers to offload the administrative burden of operating and scaling a distributed database.
It is a serverless and public database service(database-as-a-service –Dbaas)key/value & document model.
Data stores in tables rows format.we call the rows as items.there is no affixed structure(schema) to the table
Partition key column must be unique. We can also add a sort key(optional) to organize the data more effectively.
AWS takes care of all the basic need like maintenance.Highly resilient across Azs,optinally global availability.
Backups,PITR,encryption at rest.Event-driven integration(on database record changes)
DynamoDB table
DynamoDB table is a collection of items(in RDS we call rows)
No fiex structure required to maintain (expect partition and sort key columns)
Table can contain only simple key (partition) or composite key(partition+Sort)-primary key
Each item max size is 400 KB
No fixed structure required to maintain (expect partition and sort key columns)
Capacity unite(CUs) are the measurement for the DB performance.
To write the data write capacity units(WCU),1 WCU – 1 Kb per sec.
To read the data –read capacity units(RCU),1 RCU -4 kb per sec
Practical
Step1: Create one table emp,empno is partition key is the unique column
Choose Provisioned
Don't do any change click create table
Tables created
Step2: to insert the records Select the the table action explore item,
Click create item, empno is partition key remaining attributes are non unique columns, click create item
Step3:Records are inserted successfullyStep5: Query ,filter the record empno 1
Step14:Delete one record the main region us-Virginia click delete 120 deptno
No comments:
Post a Comment