On Fri, Jan 8, 2010 at 7:23 AM, P.C. <cavalo...@gmail.com> wrote: > Good evening, > > Suppose I have a text file named forms.txt with the following content: > > form1|root1 > form2|root1 > form3|root1 > form4|root2 > form5|root2 > form6|root2 > form7|root3 > > Here, I use the character "|" for separating columns. Then, I create a > database and give it the following commands: > > CREATE TABLE forms (form TEXT, root TEXT); > .separator "|" > .import forms.txt forms > CREATE INDEX key ON forms (form); > .quit > > As you can see, I create a table "forms" with two columns (form, root) > and import the content of forms.txt to this table, by using "|" as a > column separator. So far, so good. > But notice that, in the column "form", there are several values that > are associated with a same value in the column "root"; for example, > (form1, form2, form3) all belong to (root1). So, if there are several > forms associated to one root, this same root gets repeated several > times (for example, notice how "root1" is written for every form). > I was wondering whether I can associate forms of the "form" column to > a particular root in the "root" column in such a way that I don't need > to repeat the same root for every form that belongs to that root. That > would considerably reduce the database size. > Any ideas? >
http://www.google.com/search?q=db+normalization -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu ----------------------------------------------------------------------- Assertions are politics; backing up assertions with evidence is science ======================================================================= Sent from Madison, Wisconsin, United States _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users