URL domain?

From: <vadimtro_at_my-deja.com>
Date: Wed, 04 Oct 2000 21:17:20 GMT
Message-ID: <8rg6oo$l8f$1_at_nnrp1.deja.com>


When deciding upon what a URL database column might be, I spotted the following choices:

  1. Make it CHAR type.
  2. Make a URL domain type.
  3. Put whole URL object into the column cell.

The first case is trivial: something like "http://www.yahoo.com" is stored as a string, no logic attached.

In the second case it makes sence to define a domain as a string that is valid URL. Something like

try {

   java.net.URL url = new java.net.URL(urlstring); }

is a very easy way to implement this validation.

Now if I deal with java.net.URL objects anyway, why not to store them serialized in the url column (choice#3)?

Several reasons why not to:
i. More data to store.
ii. No isolation from java.net.URL implementation changes. iii. Compromised query ability.

This looks somewhat contradicting to C.Date idea that domains are objects, because in my preferred case #2 I'm still putting primitive CHAR data into the url column, and the fact that I'm performing domain validation with some object is merely an implementation detail. Am I triggering some other thoughts?

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Oct 04 2000 - 23:17:20 CEST

Original text of this message