# Object · Chromia Docs (concept)

> An object is similar to an entity, but there can be only one instance of an object:

Source: https://docs.chromia.com/rell/language-features/modules/object/

# Object

On this page

* [Accessing and modifying objects](#accessing-and-modifying-objects)
* [Reading attributes](#reading-attributes)
* [Updating attributes](#updating-attributes)

An object is similar to an entity, but there can be only one instance of an object:

Objects have the following characteristics:

* Rell objects exist as unique instances, acting as global singletons.
* Like entities, objects are stored in the database.
* Objects get initialized automatically during blockchain initialization.
* Objects cannot be directly created or deleted from code.
* Object attributes require default values.

##### Example

Rell

```
object event_stats {
    mutable event_count: integer = 0;
    mutable last_event: text = "n/a";
}
```

## Accessing and modifying objects

### Reading attributes

Employ `query` statements to retrieve object attribute values.

##### Example

Rell

```
query get_event_count() = event_stats.event_count;
```

### Updating attributes

Utilize `update` operations to modify object attributes.

##### Example

Rell

```
operation process_event(event: text) {
    update event_stats ( event_count += 1, last_event = event );
}
```

[View this page on docs.chromia.com](https://docs.chromia.com/rell/language-features/modules/object/)Content mirrored from the live docs
