Hi,
I cannot see in projectorria database any foreign indexes. This can significantly improve performance. Why you are not using them?
Regards,
Evgueni
All the primary keys are indexed, and all the keys used as foreign keys are indexed.
There is no issue performance on indexes.
What is not used is the foreign constraints integrity check.
This has been voluntarily avoided, to be able to insert or purge without having to care about integrity. This is a fluent way to importing.
Integrity is devoted ot the framework.
Hi,
About foreign keys, how can you insure that integrity is fully respected. I mean that even if you implement the integrity checks directly in PHP, some issues can exist. Only the database used with foreign key and other constraints can insure 100% integrity of the data.
For example, after some months of use of Projectorria, are you 100% sure that there is no any records without parents or any integrity issue ?
In addition, the database schema will be more readable with some foreign key links (If a user wants to modify the database he cannot understand the existing links between tables).
PS : Very good job for this tool !
Best Regards,
Contrec
how can you insure that integrity is fully respected ?
After some months of use of Projectorria, are you 100% sure that there is no any records without parents or any integrity issue ?
I cannot :blush:.
Using product from V0.1, I am almost sure integrity is not correct ! :ohmy:
And it's build this way ...
It's a design choice to gain frexibility rather than integrity.
Framework (php) is designed to :
- garanty integrity (of updates done through the framework)
- have things run correctly, even if integrity is not correct
Database schema is quite simple to understand :
- in object ObjectA, the property idObjectB points to property id of object ObjectB.
But also
- refType='ObjectB', refId='idB' points out to ... OK you get it 😉
and this relationship cannot be checked by Database foreign key integrity...
Thank you for your answer, so I understand that foreign keys will not be added in further versions.
I'll try to see and retrieve relationships as you explained 😉
Best Regards,
Contrec