| Author |
Topic |
|
krishna_yess
Yak Posting Veteran
81 Posts |
Posted - 2008-10-29 : 02:52:51
|
i have a data in MS excel like thishow to design a dtatbase for this is on table enough?, how do i normaliseplease help me thanks------ --------- --------- --------- ---------Tests Reading 1 Reading 2 Reading 3 Reading 4------ --------- --------- --------- ---------Power UP 1 2 3 4Power on 1 2 3 4From OMP 1 2 3 4Total Power 1 2 3 4Power on af 1 2 3 4Grid and EPG 1 2 3 4Grid Population 1 2 3 4Grid +/- 24h 1 2 3 4Banner loading 1 2 3 4a 1 2 3 4b 1 2 3 4a 1 2 3 4b 1 2 3 4a 1 2 3 4b 1 2 3 4a 1 2 3 4b 1 2 3 4a 1 2 3 4b 1 2 3 4a 1 2 3 4b 1 2 3 4------------------------------------------------------------------ |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-29 : 05:39:01
|
| keep two tables Tests(testid,testname) and testreadings(testreadingid,testid,readingvalue) |
 |
|
|
krishna_yess
Yak Posting Veteran
81 Posts |
Posted - 2008-10-29 : 07:58:30
|
| thanks |
 |
|
|
krishna_yess
Yak Posting Veteran
81 Posts |
Posted - 2008-10-29 : 10:54:17
|
| how can i relate these tabbles?if i just use queries to join tables is that OK?or i have to make use of FK kyes and all?andtestid is key in Tests table then testid in Testreadings populated automatically?please help me |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-29 : 11:14:02
|
quote: Originally posted by krishna_yess how can i relate these tabbles?by means of foreignkey relation which connects testreading.testid to test.testid if i just use queries to join tables is that OK?yup. you to use join to get reading for testor i have to make use of FK kyes and all?yup. you need to as specified aboveandtestid is key in Tests table then testid in Testreadings populated automatically?nope. you need to do it manually via insert statements please help me
|
 |
|
|
krishna_yess
Yak Posting Veteran
81 Posts |
Posted - 2008-10-29 : 11:34:45
|
| thanks a lot |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-29 : 11:36:32
|
welcome |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2008-10-29 : 11:58:56
|
quote: Originally posted by visakh16 keep two tables Tests(testid,testname) and testreadings(testreadingid,testid,readingvalue)
I a little confused byt he sample data but, it looks like you would want one more table Reading as TestReadings is a one to many between Test and Reading.. correct? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-29 : 12:13:55
|
| will there ever be a test reading without a test? that was why i thought two tables will be fine. |
 |
|
|
krishna_yess
Yak Posting Veteran
81 Posts |
Posted - 2008-10-30 : 03:03:26
|
i have to create one more table like this( it is in excel) and this should be linked to test table(testid, testname)how can i do that please From To Reading 1 Reading 2 Reading 3----- --- --------- --------- ---------Encrypted HD Same trans. Encrypted HD Same trans. 1 1 1Encrypted HD Same trans. Encrypted HD Diff. Trans. 1 1 1Encrypted HD Same trans. Clear HD Same trans. 1 1 1Encrypted HD Same trans. Clear HD Diff. Trans. 1 1 1Encrypted HD Same trans. Encrypted SD Same trans. 1 1 1Encrypted HD Same trans. Encrypted SD Diff. Trans. 1 1 1Encrypted HD Same trans. Clear SD Same trans. 1 1 1Encrypted HD Same trans. Clear SD Diff. Trans. 1 1 1 |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-30 : 03:20:42
|
| what does from and to designate? |
 |
|
|
krishna_yess
Yak Posting Veteran
81 Posts |
Posted - 2008-10-30 : 05:18:21
|
| these are states. there are transitions fron one state to onother. for every transition there is a valuefor eg: Encrypted HD Same trans. TO Encrypted HD Same trans. there is a value 1 under Reading 1 i think i need to create a table channelChange likeChannelChange(FromVal,ToVal,ReadingID)where ReadingID is key for Restreadings(testreadingid,testid,readingvalue)isn't ti |
 |
|
|
|