Facebook Twitter Sign in | Join

			5 MINUTES to source control your database
Getting Started with ASP.NET MVC - Part 6: ASP.NET MVC and Entity Framework
First Time? You can support us by signing up. It takes only 5 seconds. Click here to sign up. If you already have an account, click here to login.

TSQL Challenge 19 – Logic Testing Sandbox

Thomas Boixet has created a sandbox for the tricky testing of TSQL Challenge 19. You can find the sandbox here.

The sandbox is currently in draft mode. I invite all of you to take a look at the tricky scenarios implemented in the sandbox. Please let us know if you find any of the scenarios implemented in the sandbox are contradictory to the rules discussed in the challenge.


Share

Comments

# re: TSQL Challenge 19 – Logic Testing Sandbox

Thursday, April 15, 2010 9:05 AM by karinloos

I have an issue again regarding output..

SELECT 'Jablonski, Karla',0,5,18,23 UNION ALL

SELECT '    Philip',1,5,7,12 UNION ALL

SELECT '        Rance, Martine',2,5,2,7 UNION ALL

SELECT '            Nagy, Helvetius',3,2,0,2 UNION ALL

SELECT '                Sommer, Martin',4,0,0,0 UNION ALL

SELECT '    McKenna, Patricia',1,6,0,6 UNION ALL

should be  :

SELECT 'Jablonski, Karla',0,5,18,23 UNION ALL

SELECT '    McKenna, Patricia',1,6,0,6 UNION ALL

SELECT '    Philip',1,5,7,12 UNION ALL

SELECT '        Rance, Martine',2,5,2,7 UNION ALL

SELECT '            Nagy, Helvetius',3,2,0,2 UNION ALL

SELECT '                Sommer, Martin',4,0,0,0 UNION ALL

Going that the M comes before P - even though Phillip as no LastName the combined result of LastName, Firstname means  that McKenna must come first.


# re: TSQL Challenge 19 – Logic Testing Sandbox

Thursday, April 15, 2010 10:39 AM by Tomas Boixet

karinloos,

The rule 5 says:

"The employees should be ordered by lastname, firstname"

In my opinion it does not refer to the combined result but "order by lastname, firstname".


# re: TSQL Challenge 19 – Logic Testing Sandbox

Thursday, April 15, 2010 12:39 PM by Muhammad Al Pasha

I have many issues regarding the logic testing, in spit of I could fix my solution to avoid them, I should mention that they contradact with what have been said in the challenge forum, So I expect that you fix the logic testing sandbox to meet the asumptions you announce in the challenge forum.

Issues as I see them are:

1- from the logic tesing comments "An employee's first name is null, another one has null last name." but from the challenge forum "Columns EmployeeID , FirstName and LastName are all "NOT NULL".  ".

2- " An employee reports to a non-existent employeeid. Should be ignored. A couple of employees are self-reporting: same reportsto as employeeid. Should be ignored too." from the challenge forum " There is a foreign key constraint from ReportsTo to EmployeeId".

Finally I have a comment regrading one point in the logic testing "OrderID repeated for the same employee. Should count only once." because I could not find in the challenge anything enforcing that, and I do not see this as logic to be tested,because you accept same order id to be used for other employees. so either you enforce uniqueness or accept dulicates, and this my viewpoint and it is not necessary correct.

I am waiting your reply to know what I need to fix in my solution.


# re: TSQL Challenge 19 – Logic Testing Sandbox

Thursday, April 15, 2010 1:32 PM by Erick

I found the same as Pasha on his Item 1.  The forum did specify that employee's first and last names could not be null.

The duplicate order id for the same employee was not addressed.  I too would like to know if  I need to fix that.

Thanks.


# re: TSQL Challenge 19 – Logic Testing Sandbox

Friday, April 16, 2010 1:54 PM by Jacob Sebastian

I have requested Tomas to review the sandbox based on the comments of Erick and Pasha. He will post an update soon, or I will post it as soon as I hear back from him.


# re: TSQL Challenge 19 – Logic Testing Sandbox

Saturday, April 17, 2010 4:24 AM by Jacob Sebastian

Tomas sent me an updated version of the sandbox which seems to be taking care of all the problems reported so far. Please take a look at databasechallenges.com/.../logic_testing_sandbox and let me know if you still see some issues.


# re: TSQL Challenge 19 – Logic Testing Sandbox

Monday, April 19, 2010 9:16 AM by JacobSebastian

Are we all good with the current version of the sand box?


# re: TSQL Challenge 19 – Logic Testing Sandbox

Monday, April 19, 2010 11:07 AM by Erick

Yes it looks good to me now.


Copyright © Beyondrelational.com