dbTalk Databases Forums  

Chicken or Egg, XML or XSD

microsoft.public.sqlserver.xml microsoft.public.sqlserver.xml


Discuss Chicken or Egg, XML or XSD in the microsoft.public.sqlserver.xml forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
msnews.microsoft.com
 
Posts: n/a

Default Chicken or Egg, XML or XSD - 09-02-2004 , 07:55 AM






What comes first, XML or XSD? When you start building a project that
will include XML, what would you start on first, building your XML data
file or your XSD schema file?

thanks

Ralph Krausse
www.consiliumsoft.com
Use the START button? Then you need CSFastRunII...
A new kind of application launcher integrated in the taskbar!
ScreenShot - http://www.consiliumsoft.com/ScreenShot.jpg



Reply With Quote
  #2  
Old   
Graeme Malcolm
 
Posts: n/a

Default Re: Chicken or Egg, XML or XSD - 09-02-2004 , 08:53 AM






To a large extent, it probably depends on what you're going to do with the
data. Generally though. I'd be inclined to go with XSD first, since that
defines the data model - in the same way that you design a database schema
before doing any INSERT statements. Having said that, I usually go through a
kind of iterative process (for both database design and XML modelling) where
I start with an XML structure (or entity model) on paper that I know is
"kinda" what I need, and then start working out the XSD / table defs needed
for that structure. I then need to think about the various constraints,
relationships, hierarchies etc. and refine the schema from there.

So, to sum up - the answer to your question is both :-)

Of course, somethimes your just given a schema that you have to work with
(e.g. when integrating with external partners or existing systems), so the
choice goes out the window anyway!

Someone else might have a more "formal design methodology" type answer - any
takers!

Cheers,
Graeme
--
----
Graeme Malcolm
Principal Technologist
Content Master Ltd.
www.contentmaster.com


"msnews.microsoft.com" <no (AT) no (DOT) com> wrote

What comes first, XML or XSD? When you start building a project that
will include XML, what would you start on first, building your XML data
file or your XSD schema file?

thanks

Ralph Krausse
www.consiliumsoft.com
Use the START button? Then you need CSFastRunII...
A new kind of application launcher integrated in the taskbar!
ScreenShot - http://www.consiliumsoft.com/ScreenShot.jpg




Reply With Quote
  #3  
Old   
Michael Rys [MSFT]
 
Posts: n/a

Default Re: Chicken or Egg, XML or XSD - 09-02-2004 , 03:20 PM



It really depends on the application scenario.

Often, when dealing with interop scenarios, a schema is given apriori. Thus
you start with the schema.

However, one of the strengths of XML is that you can apply XSD late for
validation and apply more than one XSD for a given XML instance (to check
for different constraints). So sometimes, you may start with XML in one
place and with XSD in another, have more than one XSD developed first etc.

Sometimes if devloping markup, you may start with a small instance and
define the schema and instance iteratively.

Sometimes, you do not need (or cannot preview) a schema at all since your
XML may be very dynamic. Sometimes the data already exists and you want to
infer a schema.

I don't think that there should be a one-fit-all solution, but for many data
and document interop scenarios and database design scenarios, starting with
the schema(ta) is often a better way to understand the data.

Best regards
Michael

"Graeme Malcolm" <graemem_cm (AT) hotmail (DOT) com> wrote

Quote:
To a large extent, it probably depends on what you're going to do with the
data. Generally though. I'd be inclined to go with XSD first, since that
defines the data model - in the same way that you design a database schema
before doing any INSERT statements. Having said that, I usually go through
a
kind of iterative process (for both database design and XML modelling)
where
I start with an XML structure (or entity model) on paper that I know is
"kinda" what I need, and then start working out the XSD / table defs
needed
for that structure. I then need to think about the various constraints,
relationships, hierarchies etc. and refine the schema from there.

So, to sum up - the answer to your question is both :-)

Of course, somethimes your just given a schema that you have to work with
(e.g. when integrating with external partners or existing systems), so the
choice goes out the window anyway!

Someone else might have a more "formal design methodology" type answer -
any
takers!

Cheers,
Graeme
--
----
Graeme Malcolm
Principal Technologist
Content Master Ltd.
www.contentmaster.com


"msnews.microsoft.com" <no (AT) no (DOT) com> wrote in message
news:%23Hw5kwOkEHA.2680 (AT) TK2MSFTNGP15 (DOT) phx.gbl...
What comes first, XML or XSD? When you start building a project that
will include XML, what would you start on first, building your XML data
file or your XSD schema file?

thanks

Ralph Krausse
www.consiliumsoft.com
Use the START button? Then you need CSFastRunII...
A new kind of application launcher integrated in the taskbar!
ScreenShot - http://www.consiliumsoft.com/ScreenShot.jpg






Reply With Quote
  #4  
Old   
Yan-Hong Huang[MSFT]
 
Posts: n/a

Default RE: Chicken or Egg, XML or XSD - 09-06-2004 , 12:32 AM



Hello Ralph,

Do you have any more concerns on the reply? If there is any question,
please feel free to post here and we will follow up.

Thanks very much.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as
p&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.