Is it possible to create multiple databases or instances in neo4j, similar to the way one can create multiple databases in mysql? I found the commentary at the link below, but despite the promising title, it did not seem to answer my question. I am running the community version of neo4j, version 1.9.5 on a Mac with py2neo REST interface.
For additional context, I might want to create one database (or graph instance) for mapping nodes and relationships in a work email/contact list, and a completely separate instance for a personal family tree. I tried adding a filename to the instantiation of the GraphDatabaseService method, like so:
graph_db = neo4j.GraphDatabaseService("http://localhost:7474/db/data/graph.db")
But that did not work. Obviously, I am new to graph databases and neo4j, but I have had some previous experience in the relational database area, primarily mysql. Once again, the Q&A in the link below did not seem to completely answer my question.
Thanks.
Anyway to have multiple databases on a neo4j instance?
It is one database per port in neo. You can spin up multiple processes listening on multiple ports, if needed.
Related
This site has been great for a Symfony newbie such as myself and hopefully this will be the same experience. I have searched a lot for this question so maybe I am not using the right terminology. I have read about using services but none seem to give an example of what I need using multiple databases with different tables. So here goes, first off I am at the discretion of the current database design and I can't merge databases or recreate them, I have to use them as is. Here is the mysql query I want to use:
select name, title, rank from db1.tbl1,
db2.tbl1,db2.tbl2
where db2.tbl1.id=db2.tbl.id
and db1.tbl1.person_id=db2.tbl2.person_id;
I have created connections to the db in parameters.yml and config.yml. I was thinking about creating a repository for one of the entities and then having it innerjoin the other tables from the same database but couldn't find any examples. I want to do this using best practice. I am all ears.
I should also mention all the databases are managed by the same server.
You can't use multiple databases in a single query because for multiple databases to work, you need a manager for each.
I can't think of a solution using arrays or objects that is not resource intensive. Because you need to load at least one entire table.
I am trying to synchronize 2 different type of database together. Here is a better explanation of what I am trying to do:
I have the MySQL database on a server with the main database. I have an application installed on multiple computers.
I need the main database to be updated with the modification inside the computers and I need the computer version to get the updates from the main database.
I have seen the replication option in MySQL but it's not exactly what I want to do. I have seen other stuff like REPLACE INTO but I still don't see a clear solution.
I'm not asking for a full solution but maybe a good pseudocode or some cool functionality so I can try to implement it. This will be used on my end of school project.
I obviously have a timestamps on each row so I can detect changes.
This is how I would do this if I had an app that will run in different SQL environments.
It will be cleaner if you do the communication between yourApp & DB through some php class. This class instance will be created based on user's SQL version. Then, it is for your code in the class to decide how to connect to your DB.
is it possible to create a graphical representation of specific object in database Schema and all it relationships with all linked metadata, views, and stored procedures assocated with this object? Example: I want to define a logical relationships between “Data Sheet” tab on Prestashop product page and the rest elements in a database schema.
Yes (partially) - use the mysql workbench. It has reverse engineering db tools
see mysql dev wb link
This will generate diagram of the tables + relationships. Stored procedures, views, trigger etc are not going to be supported (too complex). You will just have to browse and reverse them yourself.
Yes, you can find PrestaShop's new Physical Data Model here: http://www.prestashop.com/blog/en/a-new-physical-data-model-available-for-prestashop/
There is a MySQL workbench model in the dev directory of the Prestashop distribution (although the last one I looked out was out of sync with the actual release database schema, although that could have been a development release). I would make that my first point of call. Unfortunately it won't show up every relationship between tables though.
One of the quickest ways to do analysis is to take a snapshot of the database, insert a particular record (user, order, customer, data sheet etc.), take another snapshot, then diff them.
I have a 3 - 4000 nodes in a drupal 6 installation on mysql and want to access these data through my django application. I have used manage.py inspectdb to get a skeleton of a model structure. I guess that there are good/historical reasons for drupal's database schemes, but find that there are some hard to understand structure and that there are some challenges in applying django models on the database. Some experiences this far are:
node and node revision are intertwined and I solved this by using a OneToOneField (don't need the versions). This meens that the node's body gets accessible through node.vid.body, but it works.
Foreign keys need to define the proper db_column to sort out the primary keys.
Terms need to use an intermediary table with ManyToManyField.through.
Drupal stores both the original and the thumbnailed/resized versions of any image as files in the files table.
Does anyone have experiences in accessing drupal data in django?
Are there better solution to for example the node <-> node revision relationship?
Drupal stores time/dates as unix-style timestamps in integerfields. Any recommendations? How about time zones?
How will you make node and revisions to a OneToOne relation, when a node can have several revisions. It might be convenient/possible now, but can give you problems later.
You should make a Manager or method to access the the latest revision of the body instead.
The problem when dealing with timestamps, is always, that the timezone information is gone. If you want that info you will need to get it from the Drupal server. If you use the same timezone though, it shouldn't be a problem unless you need the times to be very specific.
I'm working with another dev and together we're building out a MySQL database. We've each got our own local instances of MySQL 5.1 on our dev machines. We've not yet been able to identify a way for us to be able to make a local schema change (eg: add a field and some values for that field) and then export some kind of script or diff file that the other can import in. I've looked into Toad and Navicat's synchronization features but they seem oriented towards synchronizing between two instances, not an instance and an intermediate file. We thought MySQL Workbench would be great but this but the synchronization feature just seems plain broken. Any other ideas? How do you collaborate with others on the schema?
First of all put your final SQL schema into version control. So you'll always have a version of it with all changes. It can be a plain SQL file. Every developer in the team can use it as starting point to created his copy database. All changes must be applied to it. This will help you to find conflicts faster.
Also I used such file to create a test database to run unit-tests after each submit. So we were always sure that production code is working.
Then you can use any migration tool to move changed between developers. Here is similar question about this:
Mechanisms for tracking DB schema changes
If you're using PHP then look at Doctrine migrations.