[thesite] feo database changes

Warden, Matt mwarden at mattwarden.com
Thu Aug 9 19:37:03 CDT 2001


thesite,

(rudy, i know you're busy so i won't hold you to that promise of a reply)

Here are the database changes I made to allow reuse of the attribute table
for other items (here, this case, content):

CREATE TABLE ATTRIBUTETYPE (
	ATTRTYPEID NUMBER(8) NOT NULL PRIMARY KEY,
	ATTRTYPENAME VARCHAR(50) NOT NULL,
	DATEMOD DATE DEFAULT SYSDATE NOT NULL
);


ALTER TABLE ATTRIBUTE ADD ATTRTYPEID NUMBER(8) DEFAULT 1 NOT NULL
REFERENCES ATTRIBUTETYPE (ATTRTYPEID)


create table CONTENTATTR (
	CONTENTATTRID NUMBER(8) NOT NULL PRIMARY KEY,
	CONTENTID NUMBER(8) NOT NULL REFERENCES CONTENT (CONTENTID),
	ATTRID NUMBER(8) NOT NULL REFERENCES ATTRIBUTE (ATTRID),
	SEQ NUMBER(2) DEFAULT 0 NOT NULL,
	PRIV NUMBER(1) DEFAULT 0 NOT NULL,
	ATTRVALUE VARCHAR2(255) NULL,
	REMARKS VARCHAR2(255) NULL
);


I was tempted to go another step and make an ATTRVAL table and whack the
MEMBATTR table, but I figured I should make as little change as possible,
so I just added another specific table CONTENTATTR. Let me know what you
think (not just talking to rudy here, guys!).


Oh, and feel free to bitch about my syntax!!!!

Any questions/comments/complaints?



Thanks,


--
mattwarden
mattwarden.com





More information about the thesite mailing list