Hey Guys,

I was 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! :D

Can someone even help me decide on the realtionships between each table?

Can someone help me with the cardinality constraints? E.g. 1:1, 1:N, M:N...

Guys, please help me design a databse to hold test cases.

I'm really stuck at the minute.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.