How to Test That Your Database Is Consistent

preview_player
Показать описание
Do you want to ensure consistency in your database? Check out this short on data integrity testing! You'll learn how to make sure that your data is accurate and error-free.

🎓 Courses:

👍 If you enjoyed this content, give this video a like. If you want to watch more of my upcoming videos, consider subscribing to my channel!

#arjancodes #softwaredesign #python

DISCLAIMER - The links in this description might be affiliate links. If you purchase a product or service through one of those links, I may receive a small commission. There is no additional charge to you. Thanks for supporting my channel so I can continue to provide you with free content each week!
Рекомендации по теме
Комментарии
Автор

A video roughly running through these scripts would be useful! What kind of libraries are you using and what kind of things are you checking? (I know you've said it but it would be nice to see what you've implemented)

thomasroberts
Автор

Please can you make a video where do this, would really appreciate

michaelmuolokwu
Автор

I have a pattern of things to check beyond Null columns that I call the “five fingers” framework because I use my hand as a mnemonic tool:
- Thumb: Totals; do things add up overall and across breakdowns (by country, by type of customers…)?
- Index: unicity; are things meant to be unique, like one client per payment credential, actually true;
- Major: extrema; are the larger values sensible, like does one person stop interacting with the server eight hours a day? is the smallest basket size as least as expensive as the cheapest item? Does the smallest basket contain only one item?
- Ring: distribution; that is more circumstantial, but checks like quantiles: do the top 5% of users still represent between 18 and 20% of sales? For some services, those ratios are pretty stable, even when there’s a spike in activity
- Pinky: time travel: do events happen in order? Account creation before confirmation, adding to baskets before purchase? Delivery after order?

It captures more nuanced issues than just missing information, like someone funneling funds through a non-existent user, for instance.

bertilhatt
Автор

Databases deserve to be tested separately; one thing I kinda regret is not encapsulating my sqlalchemy interactions and passing those functions as callbacks or something: that way you can swap out at test time!

scvnthorpe__