Monthly Archives: June 2012

Entity Attribute Value sample

This guide is intended to help programmers and DBA’s understand the considerations and consequences associated with an EAV schema and to provide a basic framework for its implementation in SQL Server (>= 2000). It is based on the idea that … Continue reading

Posted in Business Model, Database | Leave a comment

Entity Attribute Value model

Throughout my software development career, I’ve seen my fair share of debates over how databases should be developed. And like most disagreements over technical pedantry, the participants are generally well-intentioned but grossly inexperienced. So much so that it wouldn’t matter … Continue reading

Posted in Business Model, Database | Leave a comment

SQL SERVER – The Self Join – Inner Join and Outer Join

Self Join has always been an note-worthy case. It is interesting to ask questions on self join in a room full of developers. I often ask – if there are three kind of joins, i.e.- Inner Join, Outer Join and … Continue reading

Posted in Business Model, Database | Leave a comment

Get list of tables used in a stored procedure

;WITH stored_procedures AS ( SELECT o.name AS proc_name, oo.name AS table_name, ROW_NUMBER() OVER(partition by o.name,oo.name ORDER BY o.name,oo.name) AS row FROM sysdepends d INNER JOIN sysobjects o ON o.id=d.id INNER JOIN sysobjects oo ON oo.id=d.depid WHERE o.xtype = ‘P’) SELECT … Continue reading

Posted in Problem solving, Programming | Leave a comment