Re: [PHP-DB] help in database design
what is site mean in here?? - Original Message - From: Suprie [EMAIL PROTECTED] To: php-db@lists.php.net Sent: Wednesday, March 28, 2007 5:03 PM Subject: [PHP-DB] help in database design hi all, i need help in design a database, our office is hospital equipment supplier, we had a list of items, each items had it's own configuration, and each item could consist of several item. we also had contract that have a lot of site, sometimes equipmend that have been ordered different from what the site received, in that case we made a change request... for now we have this |contract|--|has|-|site| | | |item||material| | | |configuration| i rather confused on configuration.. but plz send me a light?? but i really confused about the Change Request thing, we have to keep both what have been ordered and what have been received... where should i put it, sorri for my bad english tq -- -- Table structure for table `rsib_contract` -- CREATE TABLE `rsib_contract` ( `conId` int(11) NOT NULL, `conItemID` int(11) NOT NULL, `conSiteID` int(11) NOT NULL, `conDesc` varchar(100) collate latin1_general_ci NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `rsib_contract` -- -- -- -- Table structure for table `rsib_item` -- CREATE TABLE `rsib_item` ( `itemId` int(11) NOT NULL, `itemName` varchar(45) collate latin1_general_ci NOT NULL, `itemStat` varchar(4) collate latin1_general_ci NOT NULL, `itemDesc` text collate latin1_general_ci NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `rsib_item` -- -- -- -- Table structure for table `rsib_material` -- CREATE TABLE `rsib_material` ( `matId` int(11) NOT NULL, `matName` varchar(34) collate latin1_general_ci NOT NULL, `matDesc` text collate latin1_general_ci NOT NULL, `matItemId` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `rsib_material` -- -- -- -- Table structure for table `rsib_site` -- CREATE TABLE `rsib_site` ( `siteId` int(11) NOT NULL, `siteName` varchar(60) collate latin1_general_ci NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- Jangan tanyakan apa yang Indonesia telah berikan pada mu tapi bertanyalah apa yang telah engkau berikan kepada Indonesia -BEGIN GEEK CODE BLOCK- Version: 3.1 GU/IT d- s: a-- C++ UL P L++ E W++ N* o-- K- w PS Y-- PGP- t++ 5 X R++ tv b+ DI D+ G e+ h* r- z? --END GEEK CODE BLOCK-- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] help in database design
Suprie wrote: hi all, i need help in design a database, our office is hospital equipment supplier, we had a list of items, each items had it's own configuration, and each item could consist of several item. we also had contract that have a lot of site, sometimes equipmend that have been ordered different from what the site received, in that case we made a change request... for now we have this |contract|--|has|-|site| | | |item||material| | | |configuration| but i really confused about the Change Request thing, we have to keep both what have been ordered and what have been received... where should i put it, sorri for my bad english Why does that have to fit into this scheme? Why can't it be separate? create table change_requests ( request_id primary key .. blah blah, item_ordered text, item_order_date timestamp, // so you know when you ordered it item_received text, item_receive_date timestamp // so you know when you received it. ); problem solved ? -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] help in database design
NOT QUITE..ups.. my bad - Original Message - From: Chris [EMAIL PROTECTED] To: Suprie [EMAIL PROTECTED] Cc: php-db@lists.php.net Sent: Thursday, March 29, 2007 6:53 AM Subject: Re: [PHP-DB] help in database design Suprie wrote: hi all, i need help in design a database, our office is hospital equipment supplier, we had a list of items, each items had it's own configuration, and each item could consist of several item. we also had contract that have a lot of site, sometimes equipmend that have been ordered different from what the site received, in that case we made a change request... for now we have this |contract|--|has|-|site| | | |item||material| | | |configuration| but i really confused about the Change Request thing, we have to keep both what have been ordered and what have been received... where should i put it, sorri for my bad english Why does that have to fit into this scheme? Why can't it be separate? well as u mention above.. he already seperated while ago.. item and material was 2 different table. and yet it should seperated.. i alreadt received the newest.. i hope he posted but i posted again == site is, the items destination , owh i forgot beside the goods we also provide services, that could change also just like other items depends the situation. = as i write above.. he mistaken on what the flow goes create table change_requests ( request_id primary key .. blah blah, item_ordered text, item_order_date timestamp, // so you know when you ordered it item_received text, item_receive_date timestamp // so you know when you received it. ); problem solved ? -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php