Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 14th, 2005, 07:32 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 100
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to ~Bean~
Default DB Design Recommendations Needed

I have a project I am revamping. It has a database which stores Tests and Test Questions. As it is now, it is structured like so:

tblExam:
ID ExamNumber ExamName QuestionID TeacherID
1 1 Quiz 43 62
2 1 Quiz 44 62
3 1 Quiz 45 62
4 2 Test 304 62
5 3 Test 305 62
6 4 Test 306 62
etc.

Now if I were to design this from scratch, I probably would have made 2 tables, one for the Exam specific fields, and the other with the exam questions....like this:


tblExam:
ID ExamNumber ExamName ExamDate (etc.)
1 1 Quiz 01-01-2005
2 1 Test 02-01-2005
etc.

and

tblExamQuestions:

ID ExamNumber QuestionID QuestionWeight
1 1 43 33
2 1 44 33
3 1 45 33
4 2 304 5
5 2 305 5
6 2 306 5
etc.

Of course moving things around like this would require a rewrite of some of the underlying SQL and some class work as well.

One other thing to note is that I am adding more fields to the Tables as well, like the ExamDate field (and some other Exam options) and the QuestionWeight field (and some other questions options)

I am wondering what pros and cons are to these two designs and if a change is worth my effort...

-------------------------
Beware of programmers with screwdrivers...
__________________
-------------------------
Beware of programmers with screwdrivers...
  #2 (permalink)  
Old July 14th, 2005, 03:49 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Good database design is always worth the effort. You are on the right track.



Similar Threads
Thread Thread Starter Forum Replies Last Post
Book recommendations JBinPDX ASP.NET 3.5 Basics 2 November 14th, 2008 08:29 PM
Recommendations aspcoder BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 13 May 2nd, 2008 02:51 AM
Schedule DB design sammy1971 SQL Server 2000 0 April 30th, 2006 12:51 AM
need help with this db design method Access 4 May 11th, 2005 07:16 AM
Help needed in retriveing db reletionships method Access VBA 0 May 2nd, 2005 05:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.