Skip navigation.

Reading Schemas

databases & SQL
Often the first request I make when starting work on a new application, is to request the database schema. I thought (somehow) that this was a fairly typical tester’s first step but recently working with other testers I came to realize this might not be the case.

I thought I would quickly outline some of the things I learn from reading a database schema from a tester’s perspective.

Spread
I can gain a quick sense of how complex an application is just by seeing the model. In turn, knowing an app’s complexity helps me realize how intense SQL queries might become behind the scenes when I conduct searching testing from the front of the application.

Audit trails
I look around for tables with columns like created by, updated by, etc. Multiple timestamp entries on a table help me to watch for what (if any) objects have an audit trail. In turn, I view the objects as more sensitive for some reason and I look at those objects more closely.

Sensitive data
I look for encrypted fields. Will I be working with SSL pages? And if the password field isn’t encrypted, I’ve probably already found a bug.

Data types
I’ve written about data types before but in general, I like to know the types of data I’m working with. I especially look for large data types like blobs and texts. There’s opportunity (bug finds) in filling large objects and then running searches that tax the database.

Fat tables
I look around for tables that I think will grow in volume as the application ages. And I wonder what will happen to performance if when there’s more volume in those tables. I make arrangements for fattening up tables especially if I’m working in a pristine test environment where the data load is small and life for the application is too easy.

I could keep going, there is so much more to be said in being able to read schemas. In my view, database schemas are roadmaps and plenty can be picked up by reviewing one. In all reality what I’d like to do is build a class and offer teaching in this specific area. Maybe I will...

Mark - Thanks. Anothe

Mark -

Thanks.

Another form of testing I've done - and I'm sure you can appreciate this - is data replication. I've had times when my goal was to get data out of sync - however I could.

Another test in this category can be to look at export/import as ways to manipulate data and see if I can find ways to get data mangled or out of sync.

Denormalized data does offer testing possibilities. I saw your blog entry and you've very clearly explained what to look for and why. Good stuff.

Thanks for writing,
Karen

thanks for letting me know

Pradeep -

I am so happy to hear your response - I want anything I write about to be of practical help to other testers. Thanks for writing -it helps me to know what to continue writing about when I hear comments like yours.

Karen

Never late than before, I fee

Never late than before, I feel happy of having learned this approach by reading this post.

I'd like to share my experience of practicing this and the value this adds to my testing effort. I am sure it would be a thrilling experience for me to practice and then share it with other testers.

Thank you Karen!

Pradeep's first language is not English--his first language appears to be testing. -- Michael Bolton

Denormalization is another possible bug source

I appreciated your insights on the power of having a tester read the database schema to identify risks and assumptions. I found in our team that any time we denormalize data it deserves a second look by a tester.

We store CAD files into a database, and the contents of the CAD files have some fields which are duplicated in the database for convenience. That denormalization has been a source of inconsistencies (bugs).

We also have some fields which have been denormalized in the database for performance, and those are a risk for bugs as well.

I wrote a blog entry on a recent experience working with denormalized data.

Comment viewing options

Select your preferred way to display the comments and click 'Save settings' to activate your changes.