Code Monkey home page Code Monkey logo

Comments (6)

dongahn avatar dongahn commented on August 11, 2024 1

@cmoussa1:

I think you may want to consider actual SQL queries in mind in designing the schema further. If you want to create a full bank/accounting hierarchy like we discussed with @ryanday36, what would be typical SQL queries you would need?

Would it be mainly a Join operation? Like join the association_table with bank_table? How would you join those two? What would be a foreign key?

If you need to dump the entire bank table info into the internal tree of bank hierarchy in memory, what SQL queries and how many of those will be needed?

from flux-accounting.

ryanday36 avatar ryanday36 commented on August 11, 2024 1

The three fields, account_name, parent_acct_name, shares, are the ones I can think of that could give some baseline functionality to creating a bank hierarchy. Can you think of any other fields that might be needed?

Those three fields should be enough to build a bank hierarchy. One other thing that I'm curious about, do you see this as being one database per cluster, or a centralized database for multiple clusters? There's arguments both ways, but if it's the latter will there be an association table for each cluster (_association_table) or a field for cluster name?

from flux-accounting.

dongahn avatar dongahn commented on August 11, 2024 1

That's what I was thinking - a JOIN between association_table and bank_table. To create the hierarchy, we could join based on the account name, since that would be present in both tables.

I think a requirement expressed from @ryanday36 is that a user can belong to multiple banks. How do you plan to support this?

from flux-accounting.

cmoussa1 avatar cmoussa1 commented on August 11, 2024 1

The primary key for association_table is a combination of both username and account. This should allow multiple entries for associations with the same username that can belong to multiple banks.

from flux-accounting.

ryanday36 avatar ryanday36 commented on August 11, 2024 1

I think one database per cluster is reasonable, and probably the best way to do things, especially at first. In some senses it's more to maintain than a centralized database, but it sounds like the database is going to be pretty integral to fairshare job scheduling, so having a database per cluster removes a central point of failure that can take out all of the clusters.

from flux-accounting.

cmoussa1 avatar cmoussa1 commented on August 11, 2024

Would it be mainly a Join operation? Like join the association_table with bank_table? How would you join those two? What would be a foreign key?

That's what I was thinking - a JOIN between association_table and bank_table. To create the hierarchy, we could join based on the account name, since that would be present in both tables.

One other thing that I'm curious about, do you see this as being one database per cluster, or a centralized database for multiple clusters? There's arguments both ways, but if it's the latter will there be an association table for each cluster (_association_table) or a field for cluster name?

Good question. I was thinking this being one database per cluster - the association_table would list the users registered on the cluster, and the bank_table could list the breakdown of the accounts registered on that same cluster. Does this seem reasonable?

from flux-accounting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.