# Schema for Entity with to many attributes to define

**URL:** <https://forum.typedb.com/t/schema-for-entity-with-to-many-attributes-to-define/191>\
**Category:** TypeQL\
**Created:** [5 September 2022 07:14 UTC](https://forum.typedb.com/t/schema-for-entity-with-to-many-attributes-to-define/191 "2022-09-05T07:14:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Newone](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@Newone](https://forum.typedb.com/u/Newone)\
**Post date:** [5 September 2022 07:14 UTC](https://forum.typedb.com/t/schema-for-entity-with-to-many-attributes-to-define/191/1 "2022-09-05T07:14:11Z")

</div>

Is there a way to define an entity that has an undefined number of attributes and new attributes are added as they come?

Like:

person sub entity  
owns atribute 1  
owns atribute 2  
.  
.  
.  
owns attribute n

//and then define the attributes separately?

attribute1 sub attibute  
value double

// and the value of the attribute to be unique to the entity eg a telephone number?

---

<div class="post-metadata">

**Author:** ![krishnan](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.typedb.com/krishnan/32/36_2.png) [@krishnan](https://forum.typedb.com/u/krishnan)\
**Post date:** [5 September 2022 08:28 UTC](https://forum.typedb.com/t/schema-for-entity-with-to-many-attributes-to-define/191/2 "2022-09-05T08:28:28Z")

</div>

You can update schemas.

If you start with:

```nohighlight
attribute_1 sub attribute, value string;
person sub entity, owns attribute_1;

```

If you want to add an attribute, you don’t need to re-define all of person.  
Specifying @key makes the attribute value unique to the entity.

```nohighlight
attribute_2 sub attribute, value long;
person owns attribute_2 @key; 

```
