Creating a Database for an application

Hi, all

I'm new to here and hoping someone could help me with designing a database.

Basically, I want to design a database that will hold a bunch of test cases. For those of you that don't know, a test case simply documents a test that is to be executed on an application.

A test case lists a number of screens within the application, and each screen lists a number of fields, and each field has a corresponding value that is to be entered during that test, so it looks something like:

Test Case 1

----Details Screen

--------Name|Mary J

--------Age|40

--------Location|Home

----Contact Screen

--------Email|123@abc.com

--------Phone|12345678

--------Address|123 Fake Street

Test Case 2

----Details Screen

--------Name|Joe Bloggs

--------Age|50

--------Location|Away

----Contact Screen

--------Email|456@def.com

--------Phone|87654321

--------Address|321 Fake Street

So I need to design a database to hold the above. So I'm thinking I'll have the following tables:

TestCase{tc_id,tc_name,tc_author,tc_date}

Screen{sc_id,sc_tc_id,sc_name}

Fields{f_id,f_sc_id,f_tc_id,f_name}

Values{v_id,v_sc_id,v_tc_id,v_value}

And they would be joined as follows:

TestCase.tc_id ---> Screen.sc_tc_id

Screen.sc_id ---> f_sc_id

Screen.sc_tc_id ---> f_tc_id

Fields.f_sc_id ---> Values.v_sc_id

Fields.f_tc_id ---> Values.v_tc_id

But I'm not convinced it's the best way to go about things.

Can anyone offer me any pointers on a better design?

Thanks very much for any help!

#507140

If I understand that right, each case has one name, age, location, email, phone and address. So why do you need so much tables? Isn't one table enough?

#507148

I think your schema is ok, but I do not find the case for the field and value tables... it seems to me that having just the field table would suffice... that is simply add another field to the field table that counts for the value.

#507216