<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www2.sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Using constraints to enforce uniqueness of ordered sets of rows</title><link>http://www2.sqlblog.com/blogs/alexander_kuznetsov/archive/2013/01/28/using-constraints-to-enforce-uniqueness-of-ordered-sets-of-rows.aspx</link><description>Even the simplest data integrity rules are not easy to implement in the database if instead of individual rows we need to deal with groups or subsets. For example, making sure that a column value is unique in a table is as trivial as creating a unique</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>re: Using constraints to enforce uniqueness of ordered sets of rows</title><link>http://www2.sqlblog.com/blogs/alexander_kuznetsov/archive/2013/01/28/using-constraints-to-enforce-uniqueness-of-ordered-sets-of-rows.aspx#47475</link><pubDate>Mon, 04 Feb 2013 16:42:54 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47475</guid><dc:creator>Jason</dc:creator><description>&lt;p&gt;Okay maybe I don't understand the problem statement clearly. &amp;nbsp;I can't help but restate it as &amp;quot;I have to store recipes and their associated steps, each recipe must have unique steps (meaning no recipes may have the same step number twice as in Step 2 Boil Water and Step 2 Boil water)&amp;quot;&lt;/p&gt;
&lt;p&gt;This article claims that RDBMS are not equipped to handle this. &amp;nbsp;I disagree completely. &amp;nbsp;Create a table, tRecipe (iRecipeId INT, vcRecipeName VARCHAR(50),...). &amp;nbsp;Create another table tRecipeSteps (iRecipieStepId INT, iRecipeID,vcRecipeStepName VARCHAR(50)...) then add a unique constrain to (iRecipeId and iStepId)&lt;/p&gt;
&lt;p&gt;Again, I may be misunderstanding the problem statement, but unique groups are very much within the design of RDBMS.&lt;/p&gt;
</description></item><item><title>re: Using constraints to enforce uniqueness of ordered sets of rows</title><link>http://www2.sqlblog.com/blogs/alexander_kuznetsov/archive/2013/01/28/using-constraints-to-enforce-uniqueness-of-ordered-sets-of-rows.aspx#47476</link><pubDate>Mon, 04 Feb 2013 16:57:45 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47476</guid><dc:creator>AlexK</dc:creator><description>&lt;p&gt;Jason,&lt;/p&gt;
&lt;p&gt;What you are suggesting will ensure that every step can occur only once in a recipe. For example, you won't be able to flip your burger twice, or add one cup of flour twice. It will not prevent us from storing a recipe with exactly the same steps twice.&lt;/p&gt;
&lt;p&gt;This is not what we want to accomplish.&lt;/p&gt;
</description></item></channel></rss>