Re: Impossible Database Design?

From: Nikolai Onken <nikolai.onken_at_gmail.com>
Date: 18 May 2006 09:36:51 -0700
Message-ID: <1147970211.665128.44130_at_i39g2000cwa.googlegroups.com>


x wrote:
> >Maybe we should try indiscrete models for a change ?
> Do you mean Paris Hilton and the likes? :)

that would probably fresh it all up a little... Axel Schwenk suggested a design around these lines:

CREATE TABLE event {
  id INT PRIMARY KEY,
  desc_short VARCHAR(30),
  desc_long VARCHAR(255)
}

CREATE TABLE eventrule {
  id INT PRIMARY KEY,
  event_id INT REFERENCES event.id ON DELETE CASCADE,

  time_start TIME,
  time_end   TIME,
  date_start DATE NOT NULL,
  date_end   DATE,
  type       ENUM ('single', 'exception', 'daily', 'weekly', ...)
}

CREATE TABLE timeslot {

  start      DATETIME,
  end        DATETIME,
  rule_id    INT REFERENCES eventrule.id ON DELETE CASCADE,
  event_id   INT REFERENCES event.id     ON DELETE CASCADE
}

I think it makes sense as well only event rules get a little tricky... Received on Thu May 18 2006 - 18:36:51 CEST

Original text of this message