Re: Variable list of values in column
From: Kirk Graves (krgitsoftware_at_yahoo.com)
Date: 02/21/04
- Next message: John Bell: "Re: Variable list of values in column"
- Previous message: David Portas: "Re: Variable list of values in column"
- In reply to: Cameron: "Variable list of values in column"
- Next in thread: Roji. P. Thomas: "Re: Variable list of values in column"
- Reply: Roji. P. Thomas: "Re: Variable list of values in column"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 21 Feb 2004 13:32:57 -0700
The data structure you need would actually look like this
Table: Project
Fields: ProjectID
Name
Table: Supplier
Fields: SupplierID
Name
ProjectID
Table: Part
Fields: PartID
Name
ProjectID
using a comma delimeted list of values in a a field breaks the first rule of
normalization. this just means that a) searching is very difficult b)
updating is very difficult c) you are storing the same data repeatedly d)
people will laugh at you. :)
Kirk Graves
KRGIT Software
"Cameron" <cam_banks@hotmail.com> wrote in message
news:2cc8a69e.0402211154.7796dcf0@posting.google.com...
> I've just started to work with databases for a project that requires
> SQL Server, so I'm learning all of this as I design and develop the
> application. Anyway I need to create a table that has the following
> structure
>
>
> Project
> {
> UniqueID
> Name
> List of suppilers
> List of parts
> }
>
> The two columns "List of suppilers" and "List of parts" are dynamic,
> so for a given project it is desirable to add and remove "suppilers"
> and "parts". It is also desirable to construct searches over projects
> that contain a supplier or part.
>
> After some digging it would appear that the best way to store these
> lists would be comma separated values. So the question I have is how
> do I construct T-SQL searches and if a part or supplier is removed how
> does I ensure the lists in the project table are updated.
>
>
> Cheers
>
> Cameron
- Next message: John Bell: "Re: Variable list of values in column"
- Previous message: David Portas: "Re: Variable list of values in column"
- In reply to: Cameron: "Variable list of values in column"
- Next in thread: Roji. P. Thomas: "Re: Variable list of values in column"
- Reply: Roji. P. Thomas: "Re: Variable list of values in column"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|