His proposed design:
------------------
CREATE TABLE New_Development_Package (
# Links with building view to get building info
building_id NUMBER( 22 ) not null,
# 1 = basic; 2 = gold; 3 = platinum
package_type NUMBER( 2 ) not null,
# date package goes active
package_startdate DATE( 7 ) not null,
# date package expires
package_enddate DATE( 7 ) not null,
);
CREATE TABLE New_Development_MicroSite_Tab (
# Links with New_Development_Package
building_id NUMBER( 22 ) not null,
# Tab name ( if type = 1 ) then name is based off position ( 1 = home, 2 =description ... )
tab_name VARCHAR2( 20 ) not null,
# 1 = standard; 2 = custome;
tab_type NUMBER( 2 ) not null,
# 1 - 6
tab_position NUMBER( 2 ) not null,
# tab_text can hold the building description, floor plan info, building floorplans / pricing in xml
tab_text VARCHAR2( 2000 ) not null,
CONSTRAINT ndp_building_id PRIMARY KEY (building_id) <-- lol, how you gonna add new tabs for same building dumb ass
);
--
What we settled on after i told him:
------------------
CREATE TABLE New_Development_Package (
id NUMBER(12) auto_increasement,
user_id NUMBER(8),
building_id NUMBER( 22 ) not null,
package_type NUMBER( 2 ) not null,
package_startdate DATE not null default to SYSDATE,
package_enddate DATE not null default to SYSDATE,
package_active BIT (1|0)
);
CREATE TABLE New_Development_MicroSite_Tab (
building_id NUMBER( 22 ) not null,
tab_name VARCHAR2( 20 ) not null,
tab_type NUMBER( 2 ) not null,
tab_position NUMBER( 2 ) not null,
tab_text VARCHAR2( 4000 ) not null
);
What I still wanted:
--
NDMT table to have package_id that will link to auto_increasement id on NDP
table (makes sense right) so you can have multiple tables assigned to each package independent to
each other on every start time / end time.
His defence was... fucking wierd as fuck but w/e he will base everything off building id and sort
stuff/edit stuff based on package_startdate/enddate, i asked him ok so what if people want to run
campaign 1 2 3 on different dates and csr needs to go in and edit stuff for campaign 2 tabs will be
assigned to a building but campaign is still different... he is like umm they search by exact date and i pull
up results and when they delete it will be DELETE FROM NDP where building_id = x and start_date = x and end_date =x.
wtf? gay right?!?! and how the fuck would they have multiple tab sets per campaign date? Should i tell him to stfu and use:
CREATE TABLE New_Development_Package (
user_id NUMBER(8),
building_id NUMBER( 22 ) not null,
package_id NUMBER( 22 ) auto_increasement,
package_type NUMBER( 2 ) not null,
package_startdate DATE not null default to SYSDATE,
package_enddate DATE not null default to SYSDATE,
package_active BIT (1|0)
);
CREATE TABLE New_Development_MicroSite_Tab (
building_id NUMBER( 22 ) not null,
package_id NUMBER(22) not null,
tab_name VARCHAR2( 20 ) not null,
tab_type NUMBER( 2 ) not null,
tab_position NUMBER( 2 ) not null,
tab_text VARCHAR2( 4000 ) not null
);
so each tab can be assigned to NDP table and have more 'LINKED UP AND SAFE' lol feel, you know?