-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
453 lines (427 loc) · 26.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
<!doctype html> <!--[if IE 9]>
<html class="no-js ie9" lang="en">
<![endif]-->
<html class="no-js" lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="shortcut icon" href="http://neo4j.com/wp-content/themes/neo4jzurb/favicon.ico"/>
<title>Neo4j Movies Example Application - The Python Version | Developer Resources | Neo4j Graph Database</title>
<script type="text/javascript">
var _kmq = _kmq || [];
var _kmk = _kmk || 'a6a57b4b368caf34f5a6f2042eb075f9e559d779';
function _kms(u){
setTimeout(function(){
var d = document, f = d.getElementsByTagName('script')[0],
s = d.createElement('script');
s.type = 'text/javascript'; s.async = true; s.src = u;
f.parentNode.insertBefore(s, f);
}, 1);
}
_kms('//i.kissmetrics.com/i.js');
_kms('//doug1izaerwt3.cloudfront.net/' + _kmk + '.1.js');
</script> <script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
//Allow Linker
ga('create', 'UA-1192232-34','auto', {'allowLinker': true});
ga('send', 'pageview');
// Load the plugin.
ga('require', 'linker');
// Define which domains to autoLink.
ga('linker:autoLink', ['neo4j.org','neo4j.com','neotechnology.com','graphdatabases.com','graphconnect.com']);
</script>
<link rel="canonical" href="http://neo4j.com/guides/basic-data-modeling/"/>
<meta property="og:locale" content="en_US"/>
<meta property="og:type" content="article"/>
<meta property="og:title" content="Basic Data Modeling - Neo4j Graph Database"/>
<meta property="og:description" content="Please refer to the Neo4j Manual"/>
<meta property="og:url" content="http://neo4j.com/guides/basic-data-modeling/"/>
<meta property="og:site_name" content="Neo4j Graph Database"/>
<link rel="alternate" type="application/rss+xml" title="Neo4j Graph Database » Feed" href="http://neo4j.com/feed/"/>
<link rel="alternate" type="application/rss+xml" title="Neo4j Graph Database » Comments Feed" href="http://neo4j.com/comments/feed/"/>
<link rel="alternate" type="application/rss+xml" title="Neo4j Graph Database » Basic Data Modeling Comments Feed" href="http://neo4j.com/guides/basic-data-modeling/feed/"/>
<link rel='stylesheet' id='font-awesome-four-css' href="http://neo4j.com/wp-content/plugins/font-awesome-4-menus/css/font-awesome.min.css?ver=4.1.0" type='text/css' media='all'/>
<link rel='stylesheet' id='foundation-css' href="http://neo4j.com/wp-content/themes/neo4jzurb/assets/css/app.css?ver=4.0.0" type='text/css' media='screen'/>
<link rel='stylesheet' id='neo-codemirror-css' href="http://neo4j.com/wp-content/themes/neo4jzurb/assets/css/codemirror-neo.css?ver=4.0.0" type='text/css' media='screen'/>
<script type='text/javascript'>
/* <![CDATA[ */
var ajax_object = {"ajaxurl":"http:\/\/neo4j.com\/wp-admin\/admin-ajax.php"};
/* ]]> */
</script> <script type='text/javascript' src='http://neo4j.com/wp-content/plugins/neo4j-download/js/download.js?ver=4.0.0'></script> <script type='text/javascript' src='http://neo4j.com/wp-content/plugins/jquery-updater/js/jquery-2.1.0.min.js?ver=2.1.0'></script> <script type='text/javascript' src='http://neo4j.com/wp-content/themes/neo4jzurb/assets/js/vendor/modernizr.min.js?ver=4.0.0'></script> <script type='text/javascript' src='http://neo4j.com/wp-content/themes/neo4jzurb/assets/js/foundation.min.js?ver=4.0.0'></script> <script type='text/javascript' src='http://neo4j.com/wp-content/themes/neo4jzurb/assets/js/vendor/codemirror.min.js?ver=4.0.0'></script> <script type='text/javascript' src='http://neo4j.com/wp-content/themes/neo4jzurb/assets/js/neo_codemirror.js?ver=4.0.0'></script> <script type='text/javascript' src='//use.typekit.net/rdt4xku.js?ver=4.0.0'></script> <script type='text/javascript' src='http://neo4j.com/wp-content/themes/neo4jzurb/assets/js/misc.js?ver=4.0.0'></script> <script type='text/javascript' src='http://neo4j.com/wp-content/themes/neo4jzurb/assets/js/neo_calculator_v3.js?ver=4.0.0'></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://neo4j.com/xmlrpc.php?rsd"/>
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://neo4j.com/wp-includes/wlwmanifest.xml"/>
<meta name="generator" content="WordPress 3.9.2"/>
<link rel='shortlink' href="http://neo4j.com/?p=32079"/>
<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
</head>
<body>
<div class="off-canvas-wrap">
<div class="inner-wrap">
<aside class="left-off-canvas-menu">
<ul class="off-canvas-list">
<li><a href="http://neo4j.com/use-cases/">Use Cases</a></li>
<li><a href="http://neo4j.com/customers/">Customers</a></li>
<li><a href="http://neo4j.com/community/">Community</a></li>
<li><a href="http://neo4j.com/docs/">Docs</a></li>
<li>
<div class="medium-3 columns headspace-20">
<div class="row collapse">
<div class="small-10 columns">
<form role="search" method="get" id="searchform" class="searchform" action="http://neo4j.com/">
<input type="text" name="s" id="s"/>
</div>
<div class="small-2 columns"> <div class="button postfix"> <input type="image" id="searchsubmit" src="http://www.neo4j.com/wp-content/themes/neo4jzurb/assets/images/searchicon.png" style="vertical-align:middle;"/> </form> </div> </div>
</div>
</div>
</li>
</ul>
</aside>
<div class="marquee">
<div class="navigation">
<div class="navigation-large hide-for-small">
<div class="row">
<div class="medium-9 large-7 columns nav-list">
<ul class="inline-list">
<li><a href="http://neo4j.com/index.php"><img src="http://www.neo4j.com/wp-content/themes/neo4jzurb/assets/images/logo-neo4j.svg" class="logo" alt="neo4j"></a></li>
<li class="nav-link"><a href="http://neo4j.com/use-cases/">Use Cases</a></li>
<li class="nav-link"><a href="http://neo4j.com/customers/">Customers</a></li>
<li class="nav-link"><a href="http://neo4j.com/community/">Community</a></li>
<li class="nav-link"><a href="http://neo4j.com/docs/">Docs</a></li>
</ul>
</div>
<div class="medium-3 large-3 columns nav-search">
<div class="row collapse">
<div class="small-10 columns">
<form role="search" method="get" id="searchform" class="searchform" action="http://neo4j.com/">
<input type="text" name="s" id="s"/>
</div>
<div class="small-2 columns"> <div class="button postfix"> <input type="image" id="searchsubmit" src="http://www.neo4j.com/wp-content/themes/neo4jzurb/assets/images/searchicon.png" style="vertical-align:middle;"/> </form> </div> </div>
</div>
</div>
<div class="large-2 columns show-for-large-up"> <a href="http://neo4j.com/download/" class="tiny small button right">Download</a> </div>
</div>
</div>
<nav class="tab-bar show-for-small">
<section class="left-small"> <a class="left-off-canvas-toggle menu-icon"><span></span></a> </section>
<section class="middle tab-bar-section"> <img src="http://www.neo4j.com/wp-content/themes/neo4jzurb/assets/images/logo-neo4j.svg" class="logo" alt="neo4j" </section>
</nav>
</div>
<div class="row text-center">
<div class="medium-10 small-centered columns">
<h1 class="hero-title">Developer Resources</h1>
<h2 class="subheader"></h2>
</div>
</div>
</div>
<article id="content" role="main">
<style>
.row { max-width: 62.5rem !important; }
.lead
{
display: none;
}
section.row
{
padding: 0;
}
#content section.row
{
padding-left: .5em;
padding-right: .5em;
}
.row
{
}
#content section.row .accordion-navigation > a {
background: none repeat scroll 0 0 rgba(0, 0, 0, 0) !important;
padding: 0 !important;
}
.accordion .content { padding: 0; }
.row .row { margin: auto; }
.columns.medium-12
{
padding-left: 0;
}
</style>
<style> .lead { display: none; } section.row { padding: 0; } #content section.row { max-width: 62.5rem; padding-left: .5em; padding-right: .5em; } .row { max-width: 80em; } #content section.row .accordion-navigation > a { padding: 0 !important; } .accordion .content { padding: 0; } .row .row { margin: auto; } .columns.medium-12 { padding-left: 0; } .fa-stack.fa-lg { color: #0f5788; display: block; float: left; height: 70px; margin-right: 1em; padding-right: 2em; width: 50px; } h3 { font-weight: normal; } strong, b { font-weight:600; font-color:#333; } .calloutsection { padding: 20px 0; } section { padding: 40px 0 0 0; } .marquee { height: auto; margin-top: 1em; } #main-content .entry-title { display: none; } #main-content .subheader { display: none; } .marquee h1, .marquee h2 { padding-top: 0; } #main-content .next-steps h5 { font-size: 12px; } #main-content .next-steps h3 { margin-bottom: 1em; } #main-content .content.active { display: block; } #main-content .content { display: none; } #main-content { padding-top: 0; } .use-case .tab-container .content.active { border-top: 1px solid rgba(15, 87, 136, 0.7); padding: 2em 1em 1em; } .tabs dd > a:hover { color: #3d5360; } .breadcrumbs > * a, .breadcrumbs > * span { color: #0f5788; text-transform: none; } .breadcrumbs > * { text-transform: none; } .top-bar { height: 80px; } #main-content .top-bar-section ul { margin-top: 1em; } .panel-pod p { font-size: 14px; font-weight: normal; line-height: 26px; } .panel-pod > a { display: block; margin-bottom: 1em; } .panel-pod p a { display: block; margin-top: 1em; } .panel-pod { text-align: left; } .tab-container { margin-bottom: 2em; } .panel-pod img { display: block; margin: auto; } #content h3 { font-weight: 100; } #content ul {}
#content section.row .accordion-navigation > a {
background: url("http://dev.assets.neo4j.com.s3.amazonaws.com/wp-content/uploads/collapse.png") no-repeat scroll 100% 50% transparent;
border-bottom: 1px dashed #ddd;
padding: 0 !important;
}
.accordion-navigation.active > a {
background: url("http://dev.assets.neo4j.com.s3.amazonaws.com/wp-content/uploads/roll-up.png") no-repeat scroll 100% 50% transparent !important;
}
.accordion-navigation h5 {
font-weight: 100;
height: 2em;
line-height: 2em;
margin: 0;
}
.content ul {
margin-top: 1em;
}
.breadcrumbs>*:before {
content: "→";
color: #aaa;
margin: 0 0.75rem;
position: relative;
top: 0;
}
#content code
{
font-weight: 100;
}
#content h3
{
margin-bottom: .5em;
}
#content h5
{
font-weight: 100;
}
#content h4
{
font-weight: 400;
}
#content strong
{
font-weight: 400;
}
#content h4
{
margin-bottom: 1em;
}
#content .title {
font-size: 20px;
}
#content .breadcrumbs { margin-bottom: 0; }
</style>
<div style="padding-left: 1em; padding-right: 1em;">
<div class="row" style="padding: 10px;">
<div class="columns large-12" style="padding:10px 0 0;">
<ul class="breadcrumbs">
<li><a href="/developer-resources">Developer Guides</a></li>
<li><a href="../">Guide</a></li>
<li class="current"><a href="#">Neo4j Movies Example Application - The Python Version</a></li>
</ul>
</div>
</div>
<!-- <div class="row">
<div class="columns large-12">
<h1 style="font-size:2.1rem;">Neo4j Movies Example Application - The Python Version</h1>
</div>
</div> -->
<section class="row" style="padding:10px 0;">
<div class="large-12 columns" style="padding-top:0;">
<div id="content">
<div class="paragraph">
<p>First get yourself setup with <a href="http://docs.python-guide.org/en/latest/dev/virtualenvs/">Virtual Env</a> so we don’t break any other Python stuff you have on your machine. After you’ve got that installed let’s setup an environment for our app:</p>
</div>
<div class="listingblock">
<div class="content code-panel" style="width: 100%; height: auto; border: medium 1px;">
<pre style="font-size: 16px; font-weight: 100;" class="code programlisting cm-s-neo"><code>$ virtualenv cypher-app
New python executable in cypher-app/bin/python
Installing setuptools, pip...done.</code></pre>
</div>
</div>
<div class="listingblock">
<div class="content code-panel" style="width: 100%; height: auto; border: medium 1px;">
<pre style="font-size: 16px; font-weight: 100;" class="code programlisting cm-s-neo"><code>$ source cypher-app/bin/activate</code></pre>
</div>
</div>
<div class="paragraph">
<p>The next step is to install the dependencies for the app:</p>
</div>
<div class="listingblock">
<div class="content code-panel" style="width: 100%; height: auto; border: medium 1px;">
<pre style="font-size: 16px; font-weight: 100;" class="code programlisting cm-s-neo"><code>(cypher-app)$ pip install -r requirements.txt
...
Successfully installed py2neo
Cleaning up...</code></pre>
</div>
</div>
<div class="paragraph">
<p>And finally let’s start up a Bottle web server:</p>
</div>
<div class="listingblock">
<div class="content code-panel" style="width: 100%; height: auto; border: medium 1px;">
<pre style="font-size: 16px; font-weight: 100;" class="code programlisting cm-s-neo"><code>(cypher-app)$ python example.py
Bottle starting up
Listening on http://127.0.0.1:8080/
Hit Ctrl-C to quit.</code></pre>
</div>
</div>
<div class="paragraph">
<p>Navigate to <a href="http://localhost:8080" class="bare">http://localhost:8080</a> and you should see your first Neo4j application</p>
</div>
</div>
</div>
</section>
</div>
</article>
<div class="row text-center hide-for-small hr-style">
<div class="medium-5 columns">
<hr>
</div>
<div class="medium-2 columns"> <object height="100%" width="100%" data="http://www.neo4j.com/wp-content/themes/neo4jzurb/assets/images/hr-image.svg" type="image/svg+xml"></object> </div>
<div class="medium-5 columns">
<hr>
</div>
</div>
<div class="row text-center show-for-small">
<div class="medium-12 columns">
<hr>
</div>
</div>
</article>
<div class="calloutsection">
<div class="row">
<div class="medium-8 small-centered columns text-center">
<h3>Stay Connected</h3>
<p>Sign up to find out more about Neo4j's upcoming events & meetups.</p>
</div>
</div>
<div class="row">
<div class="medium-6 small-centered columns">
<div class="row collapse">
<div class="small-8 columns">
<script src="//app-sjl.marketo.com/js/forms2/js/forms2.js"></script>
<form id="mktoForm_519"></form>
<script>MktoForms2.loadForm("//app-sjl.marketo.com", "773-GON-065", 519);</script>
</div>
<div class="small-4 columns"> <a href="#" id="signupbody" class="button postfix">Keep Me Connected ›</a> </div>
</div>
</div>
</div>
</div>
<style> .mktoButtonWrap {display:none;} </style>
<script>
var btn = document.getElementById("signupbody");
btn.onclick = function(){
MktoForms2.getForm(519).submit();
};
</script>
<div class="row text-center hide-for-small hr-style">
<div class="medium-5 columns">
<hr>
</div>
<div class="medium-2 columns"> <object height="100%" width="100%" data="http://www.neo4j.com/wp-content/themes/neo4jzurb/assets/images/hr-image.svg" type="image/svg+xml"></object> </div>
<div class="medium-5 columns">
<hr>
</div>
</div>
<div class="row text-center show-for-small">
<div class="medium-12 columns">
<hr>
</div>
</div>
<footer id="footer">
<div class="row">
<div class="small-6 medium-3 columns">
<h5>Learn & Try</h5>
<ul>
<li><a href="../about-neo4j">About Neo4j</a></li>
<li><a href="../graph-concepts/">Graph Concepts</a></li>
<li><a href="http://neo4j.com/use-cases/">Use Cases</a></li>
<li><a href="http://neo4j.com/customers/">Our Customers</a></li>
<li><a href="http://neo4j.com/download/">Download Neo4j</a></li>
<li><a href="http://console.neo4j.org/">Live Neo4j Console</a></li>
<li><a href="working-with-data/guide-neo4j-browser/">Neo4j Browser</a></li>
<li><a href="http://gist.neo4j.org">Graph Gists</a></li>
</ul>
</div>
<div class="small-6 medium-3 columns">
<h5>Develop</h5>
<ul>
<li><a href="http://neo4j.com/docs/">Docs</a></li>
<li><a href="../">Neo4j Guides</a></li>
<li><a href="working-with-data/guide-importing-data-and-etl">Import Data</a></li>
<li><a href="http://neo4j.com/contrib/">Select a Driver</a></li>
<li><a href="cypher-query-language/guide-cypher-basics">Cypher Query Language</a></li>
<li><a href="build-a-graph-data-model/guide-intro-to-graph-modeling">Data Modeling</a></li>
</ul>
</div>
<div class="small-6 medium-3 columns">
<h5>Connect with Neo4j</h5>
<ul>
<li><a href="http://neo4j.com/training/">Training</a></li>
<li><a href="http://neo4j.com/events/">Events</a></li>
<li><a href="http://neo4j.com/blog/">Blog</a></li>
<li><a href="http://neo4j.com/community/#support">Support</a></li>
<li><a href="http://neo4j.com/neo4j-partner-program/">Neo4j Partner Program</a></li>
<li><a href="http://neotechnology.com/about/">About Neo Technology</a></li>
</ul>
</div>
<div class="small-12 medium-3 columns">
<h5><a href="http://neo4j.com/contact-us">Contact Us →</a></h5>
<p>1-855-636-4532 <a href="mailto:[email protected]">US <i class="fi-mail"></i></a><br/> +44 808 189 0493 <a href="mailto:[email protected]">UK <i class="fi-mail"></i></a><br/> +49 800 723 6231 <a href="mailto:[email protected]">Germany <i class="fi-mail"></i></a><br/> +33 (0)8 05 08 03 44 <a href="mailto:[email protected]">France <i class="fi-mail"></i></a></p>
<h5>Get Neo4j News</h5>
<p>Keep up with the latest graph database trends, tips & events.</p>
<div class="row collapse">
<div class="small-9 columns">
<script src="//app-sjl.marketo.com/js/forms2/js/forms2.js"></script>
<form id="mktoForm_477"></form>
<script>MktoForms2.loadForm("//app-sjl.marketo.com", "773-GON-065", 477);</script>
</div>
<div class="small-3 columns"> <a href="#" id="signup" class="button postfix">Go ›</a> </div>
</div>
</div>
</div>
</footer>
<style> #mktoForm_477 button {display:none;} #mktoForm_477 {margin-left:-20px;} </style>
<script>
var btn = document.getElementById("signup");
btn.onclick = function(){
MktoForms2.getForm(477).submit();
};
</script>
<div class="row text-center hide-for-small hr-style">
<div class="medium-5 columns">
<hr>
</div>
<div class="medium-2 columns"> <object height="100%" width="100%" data="http://www.neo4j.com/wp-content/themes/neo4jzurb/assets/images/hr-image.svg" type="image/svg+xml"></object> </div>
<div class="medium-5 columns">
<hr>
</div>
</div>
<div class="row text-center show-for-small">
<div class="medium-12 columns">
<hr>
</div>
</div>
<div class="row collapse copyright">
<div class="small-12 medium-3 columns text-center">
<p>© 2014 <a href="http://neotechnology.com/">Neo Technology, Inc.</a></p>
</div>
<div class="small-12 medium-6 columns text-center">
<code>(graphs)-[:ARE]-›(everywhere)</code>
<p>With ♥ from Sweden & the <a href="http://neo4j.com/community/">Neo4j</a> Community</p>
</div>
<div class="small-12 medium-3 columns text-center">
<ul>
<li><a href="http://neo4j.com/terms">Terms</a></li>
<li><a href="http://neo4j.com/privacy-policy/">Privacy Policy</a></li>
</ul>
</div>
</div>
<a class="exit-off-canvas"></a>
</div>
</div>
<script src="http://munchkin.marketo.net/munchkin.js" type="text/javascript"></script> <script type="text/javascript">mktoMunchkin("773-GON-065");</script> <script type='text/javascript' src='http://neo4j.com/wp-content/plugins/akismet/_inc/form.js?ver=3.0.1'></script> <script type='text/javascript' src='http://neo4j.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script> <script type='text/javascript' src='http://cdnjs.cloudflare.com/ajax/libs/d3/3.4.2/d3.min.js?ver=3.9.2'></script> <script type='text/javascript' src='http://cdnjs.cloudflare.com/ajax/libs/json3/3.3.0/json3.min.js?ver=3.9.2'></script> <script type='text/javascript' src='http://neo4j.com/wp-content/themes/neo4jzurb/assets/js/neo_d3.js?ver=3.9.2'></script> <script type='text/javascript' src='http://neo4j.com/wp-includes/js/comment-reply.min.js?ver=3.9.2'></script> <script>
jQuery(document).foundation({
tab: {
callback : function (tab) {
$(window).trigger('resize');
}
}
});
</script> <script src="http://www.neo4j.com/wp-content/themes/neo4jzurb/assets/js/foundation/foundation.equalizer.js"></script>
</body>
<script type="text/javascript" src="http://munchkin.marketo.net/munchkin.js"></script> <script type="text/javascript">
mktoMunchkin("773-GON-065");
</script>
</html>