

Welcome to the Tour of SurrealDB!1: Connecting to a database2: Creating records3: Using the ONLY keyword4: Non-ASCII record IDs5: Parentheses, indexing, and accessing fields6: Deleting records7: Field order in objects8: Tips when selecting records9: Casting and aliases10: Affixes11: Updating records12: Linking records13: Viewing the database as a whole14: Schemafull and schemaless15: Viewing the schema16: Literal types and assertions17: INSERT and using JSON18: FOR loops19: Basic graph relations20: Creating graph edges21: Querying graph relations22: Graph relations at greater depth23: Adding and improving data24: Defining events25: Defining indexes26: Improving the schema27: Visualising graph paths28: Recursive queries: setup29: Recursive queries30: More on recursive queries31: AI vector searchDone the tour!
14: Schemafull and schemaless
Our database now has two schemaless tables.
Schemaless means that the table is free to accept any sort of data that we give it. If the tables were SCHEMAFULL, they would have been much stricter. A schemafull table will ignore input for any field except id unless it is defined in advance.
The INFO FOR command works for other items too, like tables.
The empty output shows that place and town are schemaless, without any defined fields. That means that we could create a town whose name is a completely different type, like a number.
We don't want people to create towns with names like 9999.999999, so we will create a schema on the next page to ensure that this won't happen. Let's first delete this unwanted town.