4
In the company that I work for, there’s a data architecture that I’ve never seen before, and I’d like to know if this is common, or if it’s a new market trend. Just to mention the bank is Oracle. Here are some points:
There is almost no relationship between the tables, for example, in one of the tables there is a field that represents the id’s of another table, but this same field is not a foreign key, but an entire field, so any value can be saved there. The responsibility to ensure data integrity lies in the API that accesses this database. Soon when a POST arrives, for example, wanting to save in this field, which in my conception should be foreign key, it makes a select in this in the other table, to check if this value exists, and if yes, then it saves.
There are several databases, ie there is a database for each company subject, even if these tables of different banks could very well be related.
There is plenty of redundancy. At this point I even understand, because there is the question of 'denormalization' in pro-performance, but in this case, at least in my conception is bordering on extreme.
I questioned the person who did the modeling, and the main argument was about the performance. Therefore, all the responsibilities regarding data, integrity, business rule, are in the API. I have just started in the labour market, and I would like to know if this is a new market trend.
I’ve always been very concerned about performance, and I understand that if I do a good data architecture, use resources properly, use relationships between entities, I’ll always perform well, to be honest I can not understand how any redundancy could improve performance, even worse , not use the foreign keys that contains indexes and help a lot in queries. On second thought, I even understand data redundancy, because since there is no proper modeling, whoever designed this structure used this feature to improve performance.
– Rodrigo K.B
However, if a suitable model had been adopted, redundancy would become unnecessary.
– Rodrigo K.B
@Rodrigok. B The fact that you don’t understand doesn’t mean you don’t have advantages, it’s even a well-known fact.
– Maniero
@Maniero ok, maybe I expressed myself badly, but I’ve seen this kind of approach, of programmers using redundancy to decrease joins in their queries. What I mean is that if the data modeling is done well, it becomes unnecessary. Thinking about performance, I realized that good modeling is more efficient than redundancy. This type of approach can even help you with queries, but can cause problems in maintaining data for example. Soon I wonder, how efficient it is. Hence what I said "I can’t understand how it improves performance".
– Rodrigo K.B
This is talking about speed and not any efficiency. I agree with the other aspects.
– Maniero
@Maniero thank you for your comments.
– Rodrigo K.B
"responsibility to ensure data integrity is in the API" This is very wrong. DBMS does this and much more efficiently and safely. It has seen a lot of this type of approach and usually leads to a lot of maintenance and problems that could be avoided with the proper Fks and indexes
– jean