Working with DynamoDB Tables - Partition Key and Sort Key - Dynamo Deep Dive

  Рет қаралды 21,422

Complete Coding - Master AWS Serverless

Complete Coding - Master AWS Serverless

3 жыл бұрын

Download Your Cheat Sheet Here www.subscribepage.com/dynamoc...
✅ WATCH THIS VIDEO NEXT TO 👇🏼
📖 Prefer to read this tutorial? 👇🏼
completecoding.io/dynamodb-pksk/
✅ WATCH THIS VIDEO NEXT TO LEARN THE 7 PROJECTS YOU NEED TO LEARN SERVERLESS 👇🏼
• Become a Serverless Wi...
👇🏼 HOW WE CAN HELP YOU 👇🏼
----------------------------------------------------
📖 OUR COURSE 📘
completecoding.mykajabi.com/7...
----------------------------------------------------
🚨 WORK WITH US 🚨
completecoding.io/consulting-...
----------------------------------------------------
💻 🎥 THE KIT & TOOLS I USE 💻 🎥
completecoding.io/recommended...
----------------------------------------------------
👋 SOCIAL MEDIA 👋
📹 INSTAGRAM - @completecoding
#️⃣ TWITTER - @SamCompleteCode

Пікірлер: 36
@gonzalofernandez1
@gonzalofernandez1 3 жыл бұрын
The best dynamo explanation i have ever heard, thanks. And the cheat sheet is excellent.
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Thanks! Glad you liked the cheat sheet
@deepeshkumarr5687
@deepeshkumarr5687 3 жыл бұрын
Thanks for the video. Expecting LSI and GSI soon ❤️
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Yes, they're in the next few videos coming up!
@Eldeirdro
@Eldeirdro 9 ай бұрын
How would you get a list of all customers in the db if the single table has other entity types e.g. products, store
@charlesandrews2273
@charlesandrews2273 3 жыл бұрын
You deserve more subscribers. The best video on this topic I've come across!
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Wow, thank you! I'm slowly growing, I'm sure we'll be at 1,000,000 in no time :p
@amrmonzir
@amrmonzir 3 жыл бұрын
Thank you. Great work!
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Glad you liked it!
@cloudagnostic
@cloudagnostic 2 жыл бұрын
Hi Sam, is there a way to auto increment the primary key when a new record is created?
@CompleteCoding
@CompleteCoding 2 жыл бұрын
No there isn't. And there's a reason for that. Dynamo is designed to be massively distributed. There would be no way to be sure of the next key without querying every single distributed partition. A better option is to use unique identifiers for your primary keys. The best way to do that is with UUIDs. For you, is there a reason that the next record needs to have a key one larger than the previous, or is that idea just carried over from previous experience?
@cloudagnostic
@cloudagnostic 2 жыл бұрын
@@CompleteCoding after reading the documentation I figured it out and went there isn’t an option. I’m used to using mongo and automatically having an id created
@nastynashnash
@nastynashnash Жыл бұрын
Question in the supermarket with state example. How would you do something like "get me all the supermarkets in a particular state?"
@CompleteCoding
@CompleteCoding Жыл бұрын
for that you would have to structure your data a little bit differently ( or add another global secondary index) This would look like this id pk sk pk2 sk2 1334 wallmart washington#seattle#redmond#zipcode washington seattle#redmond#wallmart Now you can run a query on index2 where pk2 = washington. You could then refine that to query on index2 where pk2 = washington AND sk2 begins with seattle#redmond to get all the shops in redmond
@diegomarzo4001
@diegomarzo4001 3 жыл бұрын
Very good video, everything so well explained like always!!!!
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Thanks again! it means a lot
@ogcontraband
@ogcontraband 9 ай бұрын
My first real problem to solve in dynamodb is essentially do an order by. I'm seeing people saying to use client side sorting. How can it be a 'db' with the most basic operation of sorting by a column can't be done
@CompleteCoding
@CompleteCoding 9 ай бұрын
It depends on what you want to sort. You can easily sort everything in a partition using the sort keys. Doing any action on a whole table is very inefficient in Dynamo as each partition is split on different physical machines
@subowijeyesinghe3429
@subowijeyesinghe3429 3 жыл бұрын
Good one, thanks
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Glad you liked it!
@shwenansuwai2481
@shwenansuwai2481 3 жыл бұрын
Thank you so much.
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Glad you liked it
@akwashington1962
@akwashington1962 3 жыл бұрын
Good information. In the future, consider adding visuals.
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Thanks, will do!
@Mrstealurgrill
@Mrstealurgrill 3 жыл бұрын
Can you query by sort key only?
@CompleteCoding
@CompleteCoding 3 жыл бұрын
No, you always need to pass a partition key. If you really need to do search on all data then you need to use a scan. This isn't very efficient though as it reads the whole table.
@kaypakaipa8559
@kaypakaipa8559 Жыл бұрын
Wow I was confused about these 2 keys when I read about it, but your explanation is 10/10, and the answers you gave in the comments were very helpful too. Thanks Man!
@CompleteCoding
@CompleteCoding Жыл бұрын
Glad it helped!
@shinj1323
@shinj1323 2 жыл бұрын
How can you get all of the items in the table?
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Only way is to do a scan. Ideally you'd never need to get all records from a database as it's going to be a large request.
@xD-saleem
@xD-saleem Жыл бұрын
Thanks for this
@CompleteCoding
@CompleteCoding Жыл бұрын
My pleasure!
@ChazWinter
@ChazWinter 9 ай бұрын
Contents actually start at 0:56
@AshwaniKumar-yo1lk
@AshwaniKumar-yo1lk 2 жыл бұрын
No practical only theory
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Would you have preferred an example as well?
@durgadaskamath
@durgadaskamath 2 жыл бұрын
@@CompleteCoding Good explanation. Definetely example would make it much clearer as audience will know how the records are stored (same row, multiple row) and use of compound keys
Global Secondary Indexes - AWS DynamoDB Deep Dive
5:48
Complete Coding - Master AWS Serverless
Рет қаралды 6 М.
All you need to know about DynamoDB Partitions
12:39
Alex DeBrie
Рет қаралды 3,8 М.
Cool Items! New Gadgets, Smart Appliances 🌟 By 123 GO! House
00:18
123 GO! HOUSE
Рет қаралды 17 МЛН
Clowns abuse children#Short #Officer Rabbit #angel
00:51
兔子警官
Рет қаралды 75 МЛН
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 80 МЛН
Русалка
01:00
История одного вокалиста
Рет қаралды 7 МЛН
What is AWS DynamoDB Autoscaling? | Optimize your usage!
12:47
Be A Better Dev
Рет қаралды 24 М.
DynamoDB Partitions - How they work - AWS Service Deep Dive
9:29
Complete Coding - Master AWS Serverless
Рет қаралды 9 М.
How to Query your DynamoDB tables with Serverless
21:00
Complete Coding - Master AWS Serverless
Рет қаралды 10 М.
AWS DynamoDB Schema Design | How to choose the right key
12:15
Be A Better Dev
Рет қаралды 206 М.
Common Single-Table design modeling mistakes with DynamoDB
1:05:29
AWS re:Invent 2019: Data modeling with Amazon DynamoDB (CMY304)
39:47
Samsung laughing on iPhone #techbyakram
0:12
Tech by Akram
Рет қаралды 2,1 МЛН
Samsung Galaxy 🔥 #shorts  #trending #youtubeshorts  #shortvideo ujjawal4u
0:10
Ujjawal4u. 120k Views . 4 hours ago
Рет қаралды 9 МЛН
НЕ БЕРУ APPLE VISION PRO!
0:37
ТЕСЛЕР
Рет қаралды 119 М.
Как удвоить напряжение? #электроника #умножитель
1:00
Hi Dev! – Электроника
Рет қаралды 975 М.