Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!rphroy!caen!uwm.edu!src.honeywell.com!cim-vax.honeywell.com!tdoyle From: tdoyle@cim-vax.honeywell.com Newsgroups: comp.databases Subject: Re: SQL Duplicate Row Deletion ??? Message-ID: <1991Apr3.085710.57@cim-vax.honeywell.com> Date: 3 Apr 91 14:57:10 GMT References: <91091.141528SYSPMZT@GECRDVM1.BITNET> <1991Apr3.010838.2063@eng.ufl.edu> Organization: Honeywell CIS Lines: 29 In article <1991Apr3.010838.2063@eng.ufl.edu>, tsao@helios.tcad.ee.ufl.edu ( Tsao) writes: > In article <91091.141528SYSPMZT@GECRDVM1.BITNET>, SYSPMZT@gecrdvm1.crd.ge.com writes: > |> I've made a nice mistake loading data twice over several days into a table, and > ...... > > I am now using Ingres, I am surprised that it allows the user to append > duplicated rows (including a null row) into a table unless you define a key > using create unique index. > > Would anybody give me an example justifying the need for duplicated tuples > in a table ? > > In a "clean" database implementation there is NO excuse for such behavior, but alas it is simple/machine efficient? for DBMS vendors to do it this way. Since the process of relational modelling means that ultimately the tuple/relation is supposed to be in third normal form (or a close approximation) and thus should have one and only one set of attributes that uniquely identify the object. This set of attributes then should automatically have a unique index. None of the popular DBMS enforce this. Another problem with the popular DBMS's is that they don't treat null values correctly. If the attributes in the unique index are null, then multiple entries with null should be permitted (using the theory that null != null, i.e the two nulls are different). Bipin Prasad bprasad@honcim1.honeywell.com