Next we're going to get started with Neo4j by creating our first graph network. To do this, first we will review a graphical or a diagrammatic representation of a graph network. Then, we'll introduce you to an equivalent text representation of that network. Then, we will build on those text representations in the form of pseudocode, with the ultimate goal being to develop an actual script to create our network in Neo4j. Then, we'll go ahead and run the script to create the network, and we'll explore it, and confirm it structure and content. You're looking at a simple graph network, consisting of five nodes and five edges. Each node represents a person, an individual. And, the edges represent relationships between those people. Each node has a number associate with it, N1 through N5. And, each edge has a corresponding number associated with it, E1 through E5. Edges are relationships such as Harry is known by Tom, or Julian is coworker of Harry. We could have more or less edges, but we wanted to keep things relatively simple, while still maintaining a reasonable degree of complexity. What we want is a script that we can process with Neo4j in order to create an actual graph network. So, let's look at a text representation of this network. So, here we list our five nodes and five edges, and we're going to begin the process of extending the text descriptions of our graph network. I'm going to scroll down briefly, and just show you the end result, so you have a better idea of what the final goal is going to be. This is the actual code that we're going to submit to Neo4j in order to create our network. But, we're going to back up a little bit and look at some simplified versions of this syntax, so we can better understand how simple the graph network relationships really are. Here, we list the five nodes and five edges, as you saw just a moment ago. And down below, we have a simple notation structure, which attempts to describe the five edge relationships. The first line represents the edge E1. We can see that the nodes N1 and N2 are included, because Harry is known by Tom, and Tom is node N1 and Harry is node N2. The same goes for the second line, the relationship between Julian and Harry. Julian is co-worker of Harry, and so on. So, let's take this a step further by defining our graph network, so that each node is a particular type of node. In this case, we're going to define a node type as what we're calling a ToyNode. As we introduce each node and its relationship with other nodes, we'll define the node to be of type ToyNode. So, on this first line, N1 goes through e1 to N2. And, both of those are introduced for the first time, so we'll define them as type ToyNode. But, on the next line, since we already introduced N2 as type ToyNode, we don't need to repeat that statement. And, so we continue in the same manner with the remaining edge relationships. Taking this even further, we'll apply a similar kind of constraint to our edges. In this case, we'll define our network such that each edge is a particular type, which we're calling ToyRelation. Next, we're going to add properties to our nodes and edges. Our nodes can have properties such as name or job, so in this case, our first node, N1, will have the name Tom. And, the appropriate syntax for this includes curly braces surrounding the key value pairs, a colon separating the key value pairs, and the values defined within single quotes. Likewise, each edge may have a specific type of relationship, including co-worker, wife, and friend. So, finally this brings us to the actual code we're going to use to create our graph network. So, let's go ahead and copy this, and paste it into Neo4j, so we can take a look at our network. Here we are, running Neo4j in our browser. So, I'm going to paste the code that I just copied from my text file into the command line in the Neo4j interface. And, I'll click the Play button to execute those commands, and we'll see the results returned in this newly displayed panel. We can see that we have 5 labels added, 5 nodes were created, 13 properties were set, 5 relationships were created, and the entire process required 31 milliseconds. However, we still can't actually view our graph unless we issue yet another command. So, let's shuffle to our text file, and take a look at that command. What this command does, is it tries to identify a match in which a particular node has a relationship with any other node. And, then we'll return those nodes and relationships. So, we'll go ahead and copy this, and we'll paste it in to our command line, and we'll execute. And, there's our graph. When we mouse over the nodes, we can see information displayed on the bottom. And, when we select those nodes, that information is displayed permanently along the bottom, likewise with edge relationships. So, we would expect to see things such as Michelle is the wife of Harry, Julian is a co-worker of Harry, and so on. So, it looks like our network has been created successfully. We can also display information in a tabular format by clicking the Rows icon on the left. And, we'll see that this information is not constrained by the directed nature of our graph. For example, we see that Harry has a relationship with Tom, in which Harry knows Tom. But likewise, down here, Tom has a relationship with Harry, in which Tom knows Harry. Next, we're going to learn how to add to this graph and modify some of the properties of the nodes and edges.