Sunday, August 05, 2007

MPDS: Medical & Pharmaceutical Distributing System

The layouting is done. Everything's in its proper place, all sample schemas, the sizes and the colors are teacher and peers okied. A go signal for me to start with the real programming.

I've been the pretentious hardcoding genius ever since. Writing in every text editors. No WYSIWYG stuff. From layouting to programming I'm that crazy. I start out from scratch with the ever reliable Notepad then switching to Notepad++, just so I could see the line numbers, when those HTML needs PHP.

Some screenshot of the schemas already PHP-ed and MySQL-ed:
Products listing
Product listing for printing
Product information

And, yes, it's my first time to use constraints in SQL. It's hard but when tables are already linked to its right partner table the burden of linking them through query is reduced. All business rules that should be satisfied are defined from within your tables that lessens the WHEREs and the ANDs and all the SUBs. Here's a sample table with constraints.

CREATE TABLE `territories` (
`territories_ID` bigint(20) unsigned NOT NULL auto_increment,
`areasFK_ID` bigint(20) unsigned NOT NULL default '',
`territories_name` varchar(30) NOT NULL default '',
`territories_quota` varchar(15) NOT NULL default '',
PRIMARY KEY (`territories_ID`),
FOREIGN KEY (`areasFK_ID`) REFERENCES areas(`areas_ID`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;

No comments:

Recent posts



Search




Candies

Powered by FeedBurner
View blog authority Ranking.PinoyBlogosphere.Com Creative Commons License
[ You've reached the bottom. Scroll back to top ]