Can we have our own schema in Dynamo DB ?

0

I want to have a fixed schema in DynamoDB, even though it's a NoSQL database. I want to define specific column names beforehand so that whenever I add data to the database, the column names will be visible. How can I achieve this?

已提問 1 年前檢視次數 730 次
2 個答案
4
已接受的答案

Unfortunately DynamoDB does not provide out of the box capability to define a strict schema. You must impose schema validation on the client side, ensuring users add the desired fields for every mutation.

As you mention, DynamoDB is a NoSQL schemaless database, which means you must only define the keys up-front. Your application code would be responsible for ensuring all the items follow a strict schema, and can do so by setting empty values for those attributes.

profile pictureAWS
專家
已回答 1 年前
profile picture
專家
已審閱 1 個月前
  • Is there an easy to integrate readily available low or no code way to put a simple frontend in AWS using I AM authentication allowing authorised users to fill a form that calls a lambda function?

0

Yes, you can have null values for attributes with some qualifications around indexes. See: Amazon DynamoDB now supports empty values for non-key String and Binary attributes in DynamoDB tables.

profile pictureAWS
專家
kentrad
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南