.net - Hozzon létre egy SQLite adatbázist egy XSD adatkészlet alapján

original title: ".net - Create a SQLite database based on an XSD Data Set"


Does anybody know if there is a way to create a SQLite database based on an XSD DataSet? In the past I've just used a basic SQLite manager, but want to fuse things a bit more with my .NET development if possible.

Tud valaki, hogy lehet-e SQLite adatbázist létrehozni egy XSD adatkészlet alapján? A múltban csak egy alapvető SQLite kezelőt használtam, de szeretném kissé összeolvasztani a dolgokat a .NET fejlesztőmmel ...

Ez az összefoglalás a fordítás után. Ha meg szeretné tekinteni a teljes fordítást, kattintson a "fordítás" ikonra

Minden válasz
  • Translate

    I suspect in the general case this is hard; XML Schema allows for some quite bizarre type constructions. I'm not sure how you would do substitution groups, or extensions to restrictions of types for example.

    However it should be possible to knock something together quite quickly (especially mapping from the classes in System.Xml.Schema) that works for 90% of schemas (i.e. sequence and choice elements with a few simple data types).

  • Wendell Lee

    Perhaps you could use an XSL transformation to convert the XSD into SQL table definitions. Likewise, I can't find any prior examples of this, but I'd have thought it would be possible.

    I'd imagine a generic XSLT for XSD->SQL, once written, could be applied to any such scenario (and would be cross-platform too). Perhaps somebody has done this before...

  • Translate

    I'm sure you could write a small app that takes an XSD file and parses it into a SQL script. I've never seen code out there to do it though, but that's not saying it doesn't exist.