I am using Mongo as my primary database and Neo4j to store some relations.Hope Neo4j can reduce the query time for complicated searches in my application.I am confused regarding how to maintain relations between the two.
Here my question how can we create relationship between tables from two different databases in this case?
I am working on Python3.6, Django2.1, django-neomodel 0.0.4,and Djongo 1.2.30
Here is my models.py sample:
class Listing(models.Model):
''' Listing Model for mongo database '''
create_time = models.DateTimeField()
category = models.EmbeddedModelField(
model_container=Category,
)
subcategory = models.EmbeddedModelField(
model_container=Subcategory,
model_form_class=SubcategoryForm
)
...
class Listingnode(DjangoNode):
uid = UniqueIdProperty()
list_id = StringProperty()
status = StringProperty()
created = DateTimeProperty(default=datetime.utcnow)
price_range = RelationshipTo('PricerangeNodes','PRICE_RANGE')
tags = RelationshipTo('TagNodes','TAGS')