# Schema design

What DEFINE does in SurrealDB and how to inspect what you have defined.

Almost everything structural in SurrealDB starts with `DEFINE`: namespaces, databases, tables, fields, indexes, functions, access methods, parameters, and more. The [DEFINE overview](/content/docs/reference/query-language/statements/define/overview/index.html) in the API docs shows the syntax for each statement. Each such resource also has an `ALTER` and `REMOVE` statement if you need to change or remove a definition.

## Seeing what is defined

A schema will quickly grow to the point that it is no longer possible to keep in your head. The [`INFO`](/content/docs/reference/query-language/statements/info/index.html) statement can be used to show what definitions exist. `INFO` statements can be used on a variety of resources, such as `INFO FOR DATABASE`, `INFO FOR TABLE table_name`, `INFO FOR INDEX index_name`, and so on.

```
DEFINE FIELD name ON TABLE person TYPE string COMMENT "Todo: add assertion for maximum length";
INFO FOR TABLE person;
```

```
{
	events: {},
	fields: {
		name: "DEFINE FIELD name ON person TYPE string COMMENT 'Todo: add assertion for maximum length' PERMISSIONS FULL"
	},
	indexes: {},
	lives: {},
	tables: {}
}
```

Users and other global objects show up when you ask at database level:

```
DEFINE USER db_user ON DATABASE PASSWORD "strongpassword" ROLES OWNER;
DEFINE TABLE person SCHEMAFULL;
INFO FOR DB;
```

```
{
	accesses: {},
	analyzers: {},
	functions: {},
	models: {},
	params: {},
	tables: {
		person: 'DEFINE TABLE person TYPE ANY SCHEMAFULL PERMISSIONS NONE'
	},
	users: {
		db_user: "DEFINE USER db_user ON DATABASE PASSHASH '$argon2id$v=19$m=19456,t=2,p=1$P5nVYXOMvk6rEz67kjL5Dg$0T/XNmgIaB+lK0IPspg1l8LruzNK96jd/PvktRCB/ww' ROLES OWNER"
	}
}
```

## Where to go next

- [Tables](/content/docs/learn/schema-management/tables-and-fields/tables/index.html) and [fields](/content/docs/learn/schema-management/tables-and-fields/fields-and-validation/index.html)
- [Schema best practices](/content/docs/learn/schema-management/schema-design/schema-best-practices/index.html)
- [Schema evolution](/content/docs/learn/schema-management/schema-design/schema-evolution/index.html)
