By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,856 Members | 2,164 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,856 IT Pros & Developers. It's quick & easy.

XML and Searching

P: n/a
Hi,

I have come to point in my db design where I'm trying to figure which
is the best approach in making it generic (does this really matter?!?)

Senario - I have a table called JOBS and this table contains field
such as JobTitle, JobDescription, Salary etc

I want to add to this table other attributes which are specific to a
certain Job Industries.

Solution - Add a join table for each type of industry containing
attributes (db is now not generic) OR add a new table with a Industry
Type field and a XML field containing the industry specific
attributes.

If I go the XML way will this just make it complex and slow to query?
If not, what is the best way to query an XML field?

Thanks,
Jack
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
> Solution - Add a join table for each type of industry containing
attributes (db is now not generic) OR add a new table with a Industry
Type field and a XML field containing the industry specific
attributes.
If you want to query these attributes using relational queries, you're
better off with specialized tables.
If I go the XML way will this just make it complex and slow to query?
Yes, this will slow queries and add complexity. You'll need to use a cursor
and either shred the XML using a sp_xml* procs or in your client app.

BTW, the upcoming SQL 2005 version adds significant enhancements for
handling XML data. This will make it more palatable to mix relational and
XML data.
--
Hope this helps.

Dan Guzman
SQL Server MVP

"Jack" <ja****@humlog.com> wrote in message
news:6e**************************@posting.google.c om... Hi,

I have come to point in my db design where I'm trying to figure which
is the best approach in making it generic (does this really matter?!?)

Senario - I have a table called JOBS and this table contains field
such as JobTitle, JobDescription, Salary etc

I want to add to this table other attributes which are specific to a
certain Job Industries.

Solution - Add a join table for each type of industry containing
attributes (db is now not generic) OR add a new table with a Industry
Type field and a XML field containing the industry specific
attributes.

If I go the XML way will this just make it complex and slow to query?
If not, what is the best way to query an XML field?

Thanks,
Jack

Jul 23 '05 #2

P: n/a
Thanks Dan.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.