Forum

database indexes
 
Notifications
Clear all

database indexes

5 Posts
3 Users
0 Reactions
4,601 Views
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Topic starter
 
[#562]

Hi,
I cannot see in projectorria database any foreign indexes. This can significantly improve performance. Why you are not using them?
Regards,
Evgueni


 
Posted : 18 Jun 2012 19H13
(@babynus)
Posts: 14952
Member Admin
 

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.


 
Posted : 18 Jun 2012 20H18
(@contrec)
Posts: 3
New Member
 

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


 
Posted : 21 Aug 2012 16H22
(@babynus)
Posts: 14952
Member Admin
 

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...


 
Posted : 21 Aug 2012 19H23
(@contrec)
Posts: 3
New Member
 

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


 
Posted : 22 Aug 2012 10H58
Share:

Scroll to Top