cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 2: migrate recent content

Can any body share sample stock database schema?

nguyentuananh92
Node Link

I am trying to learn NEO4J just to start an application to manage and control the stock, share, person and company.

Each company have a unique code for stock like AAPL for Apple inc. It also need a number of share it has and the person who is the CEO of the company and maybe he or she will hold number of share of Apple inc.

Apple inc also have a related company and it may have child company..... So on and so on.
I start thinking that, the relationship is so complicated if i Use SQL server so I start learning NEO4J.
Do you know the sample database to manage it. I have search google by keyword "stock" but I found Inventory Management System to manage stock, product not for my purpose.

2 ACCEPTED SOLUTIONS

glilienfield
Ninja
Ninja

You could model your data something like this:

Screen Shot 2022-11-06 at 10.05.40 PM.png

View solution in original post

If they issued different types of stocks, then maybe something likes below.  There are many different ways to model your data. The correct way facilities your query patterns and what information you need to extract from the graph. 

Screen Shot 2022-11-06 at 10.11.26 PM.png

View solution in original post

3 REPLIES 3

glilienfield
Ninja
Ninja

You could model your data something like this:

Screen Shot 2022-11-06 at 10.05.40 PM.png

If they issued different types of stocks, then maybe something likes below.  There are many different ways to model your data. The correct way facilities your query patterns and what information you need to extract from the graph. 

Screen Shot 2022-11-06 at 10.11.26 PM.png

THanks for your help. I am just telling some information to manage more and more are going so I ask for sample from people who have done an application like that.

For example The Company ABC at the year 2004 it has only 2000 share the CEO hold 20 and other related company such as BCD hold 100 share.
From 2004 to 2022 the share that the company have has increase and the number of share that the CEO and related company such as BCD here has change. 
The UseCase here at any time we can know how many share each related person or Related Company such as BCD or other company hold.