Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-02-2022 12:14 AM
Hi everyone 👋
I'm Alain and new here. I started to learn Neo4j and this database is really awesome. I think it would fit for the project I'm starting to work on. The project consists in creating a deckbuilder for a new TCG (trading card game) and I need help to design the schema of the Neo4j database.
Here is the basic functionality :
A player can create some decks that will contain some cards. A card can appear several times in a deck. Each card has a cost and the user can override this cost and chose the number he wants (because some cards has effect that modify the cost of other cards).
I wanted to design the database like this :
My questions are :
I want to use Neo4j because it seems to be a good choice especially to get statistics when future features will be implemented (particularly when we will want to get the performances of cards and decks in tournaments).
It was a long message, thank you for those who will read this and help me 😊
Have a nice day everyone.
Alain
Solved! Go to Solution.
06-15-2022 12:35 AM
Hello @PastaBolo 🙂 (my answer was not sent, sorry for the delay)
Regards,
Cobra
06-02-2022 12:45 AM
Hello @PastaBolo 😊
Regards,
Cobra
06-02-2022 11:04 AM
Thank you very much @Cobra for your quick answer, I rellay appreciate that 🙂
Regards,
Alain
06-02-2022 11:24 AM
No problem 🙂
Regards,
Cobra
06-02-2022 11:57 AM
The community is not really that big at the moment. So, performances would not be a problem.
I think I will use Docker and Kubernetes for deployment. I see that there is a Docker image for Neo4j.
How should users interact with the app, that's the question. I think that both systems described can be suitable for the feature. so I need to compare how difficult the implementations of these two systems are. And I have no idea for the case the deck is updated when the user decide to save the modifications.
Regards,
Alain
06-02-2022 12:05 PM
I see 🙂
Each card will be represented by a relationship, so you will know which one to update, to create or to delete based on the id of the relationship.
Regards,
Cobra
06-02-2022 12:18 PM
The easiest way would be to update the database for each action.
With the other solution, if we update only when the user clicks the "save" button, we will perform multiple updates at once. I don't really know how to manage it in the best way.
I think that the second solution is the best but hard to set up (or I don't see how it could be easy)
Regards,
Alain
06-02-2022 12:27 PM - edited 06-02-2022 12:28 PM
06-02-2022 12:37 PM
The first solution is brutal but really easy but what about performances ? A deck contains ~60 cards so each time the user click "save", we have to remove ~60 relations and create ~60 relations.
Thank you, I will need some help for sure 😅
I will think about other features and come back with a diagram of the database. Could you comment when I post it ? That would help me a lot !
Regards,
Alain
06-02-2022 12:41 PM
No problem, happy to help 😅
I will try my best 🙂
Regards,
Cobra
06-04-2022 06:35 AM - edited 06-04-2022 06:38 AM
Hello 😁
Here is the first schema of the database :
I hope everything is clear 🙂
Regards,
Alain
06-04-2022 01:24 PM - edited 06-04-2022 01:28 PM
Hello @PastaBolo
Regards,
Cobra
06-15-2022 12:35 AM
Hello @PastaBolo 🙂 (my answer was not sent, sorry for the delay)
Regards,
Cobra
06-27-2022 01:03 AM
Thank you @Cobra for your answer 🙂
Your refactoring about the relationship between Deck and Tournament is such a great idea. It allows Tournament to optionally register the Deck that a User used for this Tournament (Deck should be optionally registered according to the type of Tournament).
Regards,
Alain
06-28-2022 01:03 AM
06-29-2022 01:04 AM
The graph has been improved a lot since the last time 😁
I have no more questions at this time. Maybe in the future when I go further in development 😉
Regards,
Alain
06-29-2022 01:06 AM
I'm happy to hear it 😊
Then, I guess you can close this topic 🙈
Regards,
Cobra
All the sessions of the conference are now available online