-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broad tables in SQL #1004
Comments
This has to do with the way things are modeled in Ampersand itself. If you do not like broad tables, you are free to use |
Ampersand knows nothing about which relations will be used frequently together. Even if we would come up with a way to not create large broad tables, it will be hard to decide which relations should be kept together. |
One way might be to have every Concept have its own broad table. So if you say |
This is a bad idea. We have been there years ago. The problem with that solution is that a single atom is represented by multipel rows. That will become a headache to control. You might have a look at the documentation of mysql itself. Good chance that there is some way to bypass the limit on the amount of colums in a single table. |
Ampersand knows nothing about which relations will be used frequently together.
Ampersand could scan the RULES to see which relations are frequently used together there.
|
Maybe. Given a set of expressions, what do you recomend? |
The 'solution' I have adopted in the GRC project is to define new concepts Would it be feasible to define syntax eg |
At the moment we have a limit imposed by MariaDB, which allows for at most 1000 columns in one database table. See http://sforsuresh.in/maximum-number-of-columns-per-table-mysql/ for details. |
Instead of trying to circumvent limitations of a database, we should see if there are posibilities in using other databases, e.g. tripplestore databases. |
As a reminder that this issue, while not urgent, is still important, I would like to inform this thread that in a discussion that @Michiel-s and I had this morning, which was about some very fundamental SIAM- and SSI related concepts, we observed that Michiel has made some design decisions for his Semantic Treehouse application that from an Ampersand/conceptual/theoretical perspective are not what you want, but have to be done if the application wants to be practical. |
Earlier (e.g. in #560), we have experienced that whilst tables in MySQL are broad, they are limited in the number of relations that they can hold. This depends a.o. on the type of TGT atoms of such relations. But all that is technical implementation, and should be of no concern to Ampersand engineers.
While developing a project that uses SIAM and four instances of the ButtonCRUD templates. I estimate that SIAM would define some , I ran into this problem again, because SIAM defines some 25+ relations in the SESSION table, and every of the four ButtonCRUD instances added another 16, which turned out to too much for MySQL to handle.
While discussing the design around Accounts, Organizations, Representatives, Groups etc. with @Michiel-s in the Semantic Tree House application, it turned out design decisions (e.g. to NOT make some concept a specialization of another one) are being made for the single purpose that the Concepts should have their own tables.
Issue #999 can be read as increasing the risk, that developers will run into this problem. That is because if we make concepts
A
andB
cyclic/equivalent, their tables are going to be merged, which requires MySQL to handle the union of all their relations in a single table.This issue therefore asks for a refactoring of the MySQL code generator, the result of which should be that every concept will get its own table.
The text was updated successfully, but these errors were encountered: