Please Help - Datashaping single table

Results 1 to 2 of 2

Thread: Please Help - Datashaping single table

  1. #1
    Join Date
    Dec 1969

    Default Please Help - Datashaping single table

    I have a problem - first I don&#039t understand datashaping too well but I am learning, second I cannot find any information as to how to datashape a single table. My problem is basically to take a table with customer_ID and a ReferrerID columns, where the customerID is unique to each customer, but there can be many ReferrerIDs, which could have many ReferrerIDs beneeth it up to 36 levels deep. Making the DB more than 1 table would result in creating 36 tables many with no recordsets (plus other unmentionable problems with changes in the future and changing referrerIDs). I wish to figure out how to use this one table all would need all of the columns from the table. <BR>Help I think that I have bit off more than I can chew.

  2. #2
    Join Date
    Dec 1969

    Default RE: Please Help - Datashaping single table

    one database design for this would have two (yes two!) tables<BR><BR>users table<BR>referal table<BR><BR>the referal table has two columns, userID, and RefererID, which is the userID of the referer, got it? so where did the 36 tables idea come from???<BR><BR>i think you may need a bit of a refresher on relational databasing before diving into datashaping too closely.<BR><BR>you could do this with one table, if you felt like it. In fact i probably would.<BR><BR>and surely, you wouldn&#039t want to change a referer ID? the alteration of historical data is reserved stricly for eastern bloc countries and religious cultists (!). Grab yourself a decent book (i suggest SAMS SQL Unleashed) - and read it. then you can get into data shaping with less fuss<BR><BR>to datashape a single table, just use two different sql commands on the one table in a shape statement. do you know anything about JOINS btw? again, refer to a book, since usually, the web is a little unclear about it.<BR><BR>j

Posting Permissions

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