Re: Overriding derived values
- From: "-CELKO-" <jcelko212@xxxxxxxxxxxxx>
- Date: 29 Nov 2005 16:37:42 -0800
CREATE TABLE Discounts
(player_id CHAR(15) NOT NULL
REFERENCES Players (player_id)
ON DELETE CASCADE
ON UPDATE CASCADE,
start_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
end_date DATETIME,
discount_percent DECIMAL (3,2) DEFAULT 0.00 NOT NULL,
CHECK (start_date < end_date),
PRIMARY KEY (player_id, start_date));
Use a NULL to represent "eternity" and use a stored procedure to add
one-month rows based on the bowler's average.
If they are not on the "permanent bad guy list" as shown by (end_date
IS NULL), then leave the row until it is manually overridden.
.
- References:
- Overriding derived values
- From: Ira Gladnick
- Overriding derived values
- Prev by Date: Re: Attribute name prefixes, domains, joins, ISO 11179
- Next by Date: Re: Attribute name prefixes, domains, joins, ISO 11179
- Previous by thread: Re: Overriding derived values
- Next by thread: What is the difference between....
- Index(es):
Relevant Pages
|