Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Building web applications with Python and Neo4j
  • Table Of Contents Toc
Building web applications with Python and Neo4j

Building web applications with Python and Neo4j

By : Sumit Gupta
4.3 (3)
close
close
Building web applications with Python and Neo4j

Building web applications with Python and Neo4j

4.3 (3)
By: Sumit Gupta

Overview of this book

If you are a Python developer and want to expand your understanding of Python-based web applications over Neo4j graph data models, this is the book for you.
Table of Contents (9 chapters)
close
close
8
Index

Preface

Relational databases have been one of the most widely used and most common forms of software systems for the storage of data since the 1970s. They are highly structured and store data in the form of tables, that is, with rows and columns. Structuring and storing data in the form of rows and columns has its own advantages; for example, it is easier to understand and locate data, reduce data redundancy by applying normalization, maintain data integrity, and much more.

But is this the best way to store any kind of data?

Let's consider an example of social networking:

Mike, John, and Claudia are friends. Claudia is married to Wilson. Mike and Wilson work for the same company.

Here is one of the possible ways to structure this data in a relational database:

Preface

Complex, isn't it? And it can be more complex!

We should remember that relationships are evolving, and will evolve over a period of time. There could be new relationships, or there could be changes to existing relationships.

We can design a better structure but in any case, wouldn't that be forcibly fitting the model into a structure?

RDBMS is good for use cases where the relationship between entities is more or less static and does not change over a period of time. Moreover, the focus of RDBMS is more on the entities and less on the relationships between them.

There could be many more examples where RDBMS may not be the right choice:

  1. Model and store 7 billion people objects and 3 billion non-people objects to provide an "earth view" drill-down from the planet to a sidewalk
  2. Network management
  3. Genealogy
  4. Public transport links and road maps

Consider another way of modelling the same data:

Preface

Simple, isn't it?

Welcome to the world of Neo4j—a graph database.

Although there is no single definition of graphs, here is the simplest one (http://en.wikipedia.org/wiki/Graph_(abstract_data_type)), which helps us to understand the theory of graphs:

A graph data structure consists of a finite (and possibly mutable) set of nodes or vertices, together with a set of ordered pairs of these nodes (or, in some cases, a set of unordered pairs). These pairs are known as edges or arcs. As in mathematics, an edge (x,y) is said to point or go from x to y. The nodes may be part of the graph structure, or may be external entities represented by integer indices or references.

Neo4j, as an open source graph database, is part of the NoSQL family, and provides a flexible data structure, where the focus is on the relationships between the entities rather than the entities themselves.

Its first version (1.0) was released in February 2010, and since then, it has never stopped. It is amazing to see the pace at which Neo4J has evolved over the years. At the time of writing this book, the stable version was 2.2.RC01, which was released in March 2015.

If you are reading this book, then you probably already have sufficient knowledge about graph databases and Python. You will appreciate their contribution to the complex world of relationships.

Let's move forward and jump into the nitty-gritty of developing web applications with Python and Neo4j.

In the subsequent chapters, we will cover the various aspects dealing with data modelling, programming, and data analysis by means of application development with Python and Neo4j. We will cover the concepts of working with py2neo, Django, flask, and many more.

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Building web applications with Python and Neo4j
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon