Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
krishna_yess
Yak Posting Veteran
81 Posts |
Posted - 2009-09-11 : 02:21:08
|
| [code]Table: Boot Up Time-------------------- Project: Cable Zapper-------------------------------------------------- OMP Home AV Readings------------------------------3.26 16.7 1.03 13.18 16.35 0.65 23.34 16.67 0.63 3 [/code]I have data like this. I need to design a table for Many Projects like this.How do i design a table in SQL.I have created a table like this..[code]-----------------------CREATE TABLE [dbo].[Boot_Up_Time]( [ID] [int] NULL, [Project] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [OMP_Reading1] [numeric](18, 0) NULL, [OMP_Reading2] [numeric](18, 0) NULL, [OMP_Reading3] [numeric](18, 0) NULL, [Home_Reading1] [numeric](18, 0) NULL, [Home_Reading2] [numeric](18, 0) NULL, [Home_Reading3] [numeric](18, 0) NULL, [AV_Reading1] [numeric](18, 0) NULL, [AV_Reading2] [numeric](18, 0) NULL, [AV_Reading3] [numeric](18, 0) NULL) ON [PRIMARY]-----------------------[/code]is this ok. whether it confirms RDBMS |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-09-11 : 02:40:10
|
Since we don't know what it is (OMP,Home,AV,Readings)we cannot say if your table is ok.Are there relations like one:many between Project and OMP,Home,AV,Readings? No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-09-11 : 02:48:47
|
Boot_Up_Time- ID int- Project nvarchar(50)Readings- ID int -- <pk> FK to Boot_Up_Time- Reading_Type int -- <pk> 1 - OMP, 2 - Home, 3 - AV- Reading_No int -- <pk> Reading No 1, 2, 3, etc- Readings decimal(18,2) KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-09-11 : 03:13:39
|
quote: Originally posted by khtan
Boot_Up_Time- ID int- Project nvarchar(50)Readings- ID int -- <pk> FK to Boot_Up_Time- Reading_Type int -- <pk> 1 - OMP, 2 - Home, 3 - AV- Reading_No int -- <pk> Reading No 1, 2, 3, etc- Readings decimal(18,2) KH[spoiler]Time is always against us[/spoiler]
Hi KH,this is speculation about relations but I think you're right. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-09-11 : 03:22:44
|
Just a guess, have to wait for OP's feedback to confirm. Anyway this will be more flexible and easier to expand when the requirement changes. KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
krishna_yess
Yak Posting Veteran
81 Posts |
Posted - 2009-09-23 : 04:58:58
|
| can i get a sample script for this.. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-09-23 : 07:20:36
|
But we don't even know what you really wants at all in the first place. KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|
|
|