1

在 Azure 表存储中,是否可以在给定表的列上添加唯一约束?

4

2 回答 2

2

Azure 表存储实体没有。每个实体都可能具有属性,并且这些属性不需要对每个实体都相同。

唯一唯一的约束是partition key+的组合row key

于 2013-08-13T03:40:32.090 回答
0

There's an excellent article on Azure table storage here:

http://msdn.microsoft.com/en-us/library/windowsazure/dd179338.aspx

Since it only has a Row Key and a Partition Key, and the Row Key is essentially the primary key, it doesn't look like there's any other constraint you can put on it unless you build that sort of thing into your client/server which uses or exposes it.

From the article:

The Table service does not enforce any schema for tables, so two entities in the same table may have different sets of properties. Developers may choose to enforce a schema on the client side. A table may contain any number of entities.

HTH :)

于 2013-08-13T03:42:13.207 回答