问题
I read some where that noe4j or other nosql database is schemaless. so what is the schemaless? I would like to know more about it with use case.
回答1:
You don't need to define a schema like you would have to do e.g. in mysq with a table. Instead, you can add properties and their value to each individual node (entry), as you like.
E.g: if you look at the address book in an android phone a person entry can have a multitude of properties - phone numbers, addresses, names. Some people have a lot of attributes, some have none.
Doing something like that with a schema (e.g. table structure) is really hard, and requires advance planning of what your fields are, and how you want to query them in the future.
Without a schema you can more or less play it by ear, and add things as needed.
What needs deciding though is what to add as property to a node, and what as a related node. E.g. is an address a node, or just a property of a person? (Most likely a seperate node, but it depends on your use case)
来源:https://stackoverflow.com/questions/17880868/neo4j-how-do-i-model-node-schema-less