-
Book Overview & Buying
-
Table Of Contents
Learning Cypher
By :
Pattern matching is useful to describe the data we are looking for and how nodes and relations are organized in the graph database. However, we often need to filter data in more detail.
In this chapter, we'll learn how to filter results using a real-world example: the book store. Just as we saw in the previous chapter, we have to define labels and relationships. A minimal set of labels are as follows:
Book: This label includes all the books
Person: This label includes authors, translators, reviewers, and so on
Publisher: This label includes the publishers of books in the database
User: This label includes the users of the website
A set of basic relationships are as follows:
PublishedBy: This relationship is used to specify that a book was published by a publisher
Votes: This relationship describes the relation between a user and a book, for example, how a book was rated by a user
Every book has the following properties:
Title: This is the title of the book...
Change the font size
Change margin width
Change background colour