This is, as you guess, a very basic issue for relational databases.  You
never want to put multiple entries in one column, as you describe it.
That's the scenario in which you create another table and use a key to join
the two.  For your project, you should have a column in the nms_apps table
that uniquely identifies it -- the primary key, usually.  You'll want to
create a table, perhaps called 'user,' containing the 'used_by' information.
That table would have, at a minimum, a column for the nms_apps key and a
column that contains the user information.  Then to find out who uses a
given application, the query would be along these lines (this uses the
column 'app_id' as the key:

SELECT used_by FROM nms_apps, user WHERE nms_apps.app_id = user.app_id AND
app_name = "Application Foo"

Hope that helps.  If you grasp this, you'll have the basic idea of
relational data.

Nick

--
Nick Arnett
Phone/fax: (408) 904-7198
[EMAIL PROTECTED]


> -----Original Message-----
> From: James Walters [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 29, 2003 10:42 AM
> To: [EMAIL PROTECTED]
> Subject: Basic Database Design Question
>
>
> Hello,
>
> DB novice checking in here with a basic design
> question.  I have a table called 'nms_apps' which
> stores information about all of our applications which
> we have developed/maintained for our client.  One
> column which I would like to use is called 'used_by',
> which would store information about which business
> sections (Financial Management Branch, Human Resources
> Branch, etc.) use a particular application.  Often
> times more than one section use a particular
> application.  My question is this:
>
> How do you handle multiple entries in one column?  Is
> it acceptable to more than one value in a column for
> one row?  If not, what is the best way to design that
> in the table?  Have multiple 'used_by' columns?
> 'used_by_1', 'used_by_2', 'used_by_3', etc.?
>
> Thanks in advance,
>
> Testudo
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to