Database Orgnazition

Results 1 to 2 of 2

Thread: Database Orgnazition

  1. #1
    SVK Guest

    Default Database Orgnazition

    I was wondering how you would handle this..<BR>Right now I have a Table Named locatios<BR>in this table I have a colum for startes and several states listed;<BR>location&#062;states<BR>so far so good.. now each state has subregions so I added a colum<BR>and I list my sub regions and seperate them with a space and use the split function when I want to display all the sub regoins for the state;<BR>locations&#062;state <BR>-sub <BR>-sub <BR>-sub<BR><BR>Its all good but the sub regions need sub regions so this is where I am baffled. So how would I do this wiht out making 500 tables of subs. It makes sence in a tree folder system but not a database<BR><BR>Thanks for any help

  2. #2
    Join Date
    Dec 1969

    Default Read about NORMALIZATION

    Never, never, never put multiple values into a single field.<BR><BR>You should have tables for states, regions, and subregions.<BR><BR>Thus:<BR><BR>Table: States<BR>&nbsp; &nbsp; Abbrev -- two letter abbreviation, also used as Primary Key!<BR>&nbsp; &nbsp; ... any other state level info ...<BR><BR>Table: Regions<BR>&nbsp; &nbsp; RegionID -- Autonumber? Primary key<BR>&nbsp; &nbsp; StateAbbrev -- foreign key into States table<BR>&nbsp; &nbsp; ... any region level info ...<BR><BR>Table: SubRegions<BR>&nbsp; &nbsp; SubRegionID -- Autonumber? Primary key<BR>&nbsp; &nbsp; RegionID -- foreign key into Regions table<BR>&nbsp; &nbsp; ... subregion level info ...<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts