The Source for Java Technology Collaboration
User: Password:



Will Iverson

Will Iverson's Blog

Annoying Data Types & Open Sourcing A Schema Update Library

Posted by wiverson on July 14, 2003 at 01:29 PM | Comments (4)

One of the things that I've been somewhat annoyed by is the sheer variety of data types floating around. I'm reminded of the old days, when connecting to a BBS and you had to specify even/odd parity, or the bit order - nowadays, you can pretty much just assume that you can connect with a PPP connection to get a TCP/IP "dialtone."

I've been somewhat surprised at how long the data type problem has been floating around (no pun intended) in the computing world. I can talk about a bit pretty conclusively. I can hope that a byte is ordered the right way. I have a dim hope about a char in the lower 127 range, but the high bit stuff is less convincing. And a string? I can hope that a Java String is Unicode, but if I write it to disk (or read it back) it's a bit more dicey.

One of my more interesting consulting gigs was explaining to people why the text data in their database was in a lot of trouble. They had been accepting regular US ISO-8859-1 text, ASCII, and also some south European, and even a bit of Japanese, and were running into all sorts of problems.

Then, there's the database impedence mismatch. What's a character? What's an INT or a BIGINT, or a TEXT? Or, forbid, the various date and time incarnations? How do the differences there match up to Java? What about if somebody else is using PHP for a bit, and they're talking to the same database...?

This is cropping up in the web services field as well (again, no pun intended). Consider the various lumps of text that might be flying back and forth, for example in a catalog. Are little bits of HTML allowed? What are the rules for that?

Thoughts?

As a side note, I've been working on a small framework for an application that provides for a common XML format and a set of Java classes for installing schema into a relational database. The idea is that your application can install the schema automatically when you first install the application - you just have to specify the schema in XML and then let the application know to install. One of the nicer aspects it that It uses a lot of ALTER TABLE commands to generate the schema - you don't have to lose your existing data set if you add a field. I think this might be a useful LGPL open source project - thoughts...?


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Anoying Data types...
    How about using ant to install your schema?

    Posted by: thealey on July 14, 2003 at 06:45 PM

  • Anoying Data types...
    I'd want to wrap it / make it available as an Ant task. Ant's generally used as a compilation-time tool, not a runtime tool, and the library works both ways.

    I'm waiting for someone to come up with an installer that's based on Ant. One thing at a time... ;)

    Posted by: wiverson on July 15, 2003 at 10:39 AM

  • A small framework ...
    I seem to have done something like this a year or so ago. It needs more work to map types for different databases, but is quite good at inserting/deleting/renaming columns or tables in a database. The (xml) schema can be generated from an existing database and then a second database updated to match. LGPL wouldn't be my choice of licence at least until we are sure what it means

    Posted by: mthornton on July 18, 2003 at 01:34 PM

  • 网络营销软件
    网络营销软件
    网络营销软件
    群发软件
    群发软件
    ---
    群发软件
    网络营销软件网络推广软件网站推广软件下载引擎登陆软件论坛群发软件下载免费版
    论坛群发软件,信息群发软件,群发软件,网络营销软件,网站推广软件引擎登陆软件下载
    网站排名软件网站推广软件信息群发软件博客群发软件论坛群发软件免费下载
    群发软件,信息群发软件,博客群发软件,论坛群发软件,免费下载:群发软件系统
    推广小助手破解版
    论坛群发软件
    网站排名软件
    群发软件
    推荐给你很好的群发软件和信息群发软件和供求群发软件
    推荐给你很好的群发软件和信息群发软件和供求群发软件博客群发软件网络营销软件网络营销软件
    网站排名软件网站排名软件网站优化软件信息群发软件信息群发软件信息群发软件论坛群发软件网站推广软件网站推广软件博客群发软件博客群发软件

    群发软件群发软件博客群发软件论坛群发软件网络营销软件论坛群发软件
    信息群发软件推广软件网站推广软件网络营销软件网站推广软件群发软件网站排名软件网站推广软件博客群发软件论坛群发软件群发软件网站排名软件网站推广软件博客群发软件论坛群发软件
    网站排名软件
    博客群发软件
    网站排名软件
    网站推广软件
    群发软件信息群发软件
    免费论坛群发软件
    论坛群发软件
    网站排名软件
    免费博客群发软件
    网站推广软件

    群发软件
    博客群发软件
    网站排名软件
    网站推广软件
    群发软件信息群发软件
    免费论坛群发软件
    论坛群发软件
    网站排名软件
    免费博客群发软件
    博客群发软件
    信息群发软件
    论坛群发软件
    信息群发软件
    博客群发软件
    qq群发软件
    邮件群发软件
    博客群建软件
    企业名录搜索软件
    信息群发软件
    邮件群发软件
    论坛群发软件
    博客群发软件
    网站推广软件
    网络营销软件

    Posted by: xinxi123 on December 04, 2007 at 01:38 AM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds