# Views

## Overview

A table view, commonly known as a "view," is a virtual table created by querying existing database tables. It doesn't store data but shows a real-time snapshot of chosen data from other tables.

## Get Started

Once the database server connection has been set up, developers now have the possibility to access and manage database tables and [views](/reference/servoycore/object-model/database-server/view.md).

{% hint style="danger" %}
**Read-Only**\
Views cannot be defined in Servoy Developer, this can be done by using the database admin tool of the developer's choice.
{% endhint %}

## Connecting to a View

If a view is made with database tools, you can find it in Servoy Developer within the `Views` folder of the relevant database server.

{% hint style="warning" %}
**Advanced Feature**\
Only work with Views if you already use them.
{% endhint %}

### Open a View

Servoy applications can access the database views that are already created.

To open an existing view, expand the [Database Servers](/reference/servoy-developer/solution-explorer/resources/database-servers.md) node in the [Solution Explorer](/reference/servoy-developer/solution-explorer.md), then open the needed database and select the "Views" folder. The list of views will be displayed and there are 3 ways of opening a [view](/reference/servoycore/object-model/database-server/view.md):

* select the [View](/reference/servoycore/object-model/database-server/view.md), then click on the `edit table/view` button in toolbar of the list view
* right-click the [View](/reference/servoycore/object-model/database-server/view.md) and select [Edit table/view](/reference/servoy-developer/solution-explorer/resources/database-servers/database-server/views.md)
* double click the [View](/reference/servoycore/object-model/database-server/view.md) name

<div align="left"><figure><img src="/files/GGNhUiAkEn7SivEKjwQZ" alt="" width="650"><figcaption><p>Open a view</p></figcaption></figure></div>

### Edit a View

For the most part, Views behave like a [Table](/guides/develop/application-design/data-modeling/databases/tables.md) in Servoy.\
In order to edit a View in Servoy Developer, you should first have [connected to your database](/guides/develop/application-design/data-modeling/databases.md#connect-to-a-database) and [opened the View](#open-a-view) in the [Table Editor](/reference/servoy-developer/object-editors/table-editor.md).

Here you can manage:

* [calculations](/guides/develop/application-design/data-modeling/databases/tables/calculations.md#calculations)
* [aggregations](/guides/develop/application-design/data-modeling/databases/tables/aggregations.md#aggregations)
* [methods](/guides/develop/application-design/data-modeling/databases/tables/methods.md#methods)
* [events/triggers](/guides/develop/application-design/data-modeling/databases/tables/events-triggers.md#events--triggers)
* [columns](/guides/develop/application-design/data-modeling/databases/tables/columns.md#columns)

{% hint style="danger" %}
View columns **cannot** be added nor deleted in Servoy Developer.
{% endhint %}

{% hint style="warning" %}
Servoy requires a primary key and if there is not one, a *row\_ident*, which guarantees uniqueness.\
In order to use Views in Servoy Developer, **at least one column must be marked as** [**'row\_ident'**](/reference/servoycore/object-model/database-server/table/column.md#row-ident).
{% endhint %}

### Updateable Views

### Cached data


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.servoy.com/guides/develop/application-design/data-modeling/databases/views.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
