Re: Help, my developers are killing me with varchar2(4000)

From: Wolfram Roesler <wr_at_spam.la>
Date: Mon, 11 Aug 2008 13:21:42 +0000 (UTC)
Message-ID: <Xns9AF79C44AF1FCwrgrpde@78.46.73.112>


RogBaker_at_gmail.com wrote in news:fca4ed5e-1e56-4703-82fc-91ae3a35b1d1 @d1g2000hsg.googlegroups.com:

> I have a developer that created some tables in a development instnace
> and wants me to promote them to QA. I took a look at them, and nearly
> every column is varchar2(4000). I am pretty sure this is overkill for
> most of them. I know it takes up as much room as the data, but I just
> don't like this design philosophy. Does anyone have any references/
> urls saying this is a bad idea to design tables like this? It has been
> my experience that you get bad data by allowing columns to contain
> more data then what it should really hold.

Probably they want "random length" strings - a possibility to store a string without having to implement an artificial size limit. C++ can do it (using the std::string datatype), JavaScript can do it, Tcl can do it, SQLite can do it, old Unix shells and modern BASICs can can do it, but Oracle can't, so they use VARCHAR2(4000), which is the closest thing to a random length string they can get with Oracle. Quite understandable for someone with a C++/JavaScript/Tcl/whatever background imho.

Of course it is bad style, but the question why this actualls IS bad (i. e. what bad things will happen with it) still hasn't been answered in this discussion. Neither has the question been asked why Oracle doesn't support a random length string datatype.

Best regards
W. Rösler Received on Mon Aug 11 2008 - 08:21:42 CDT

Original text of this message