Thanx Both of you for your quick reply...
I was looking for the short cut because i am not able to implement the foreign key concept in service.xml
Below is the structure of one of the table .
Could you plz tell me how to write the red colored constraint in service xml
DROP TABLE IF EXISTS `company`;
CREATE TABLE IF NOT EXISTS `company` (
`companyid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`companyname` varchar(100) NOT NULL,
`companyuid` varchar(100) NOT NULL,
`companywebsite` varchar(200) DEFAULT NULL,
`dateofestablishment` date DEFAULT NULL,
`numofemployees` int(10) unsigned DEFAULT NULL,
`companydescription` longtext,
`businessoperations` longtext,
`financials` longtext,
`companytypeid` tinyint(3) unsigned DEFAULT NULL,
`companystatusid` tinyint(3) unsigned DEFAULT NULL,
`entitystatusid` tinyint(3) unsigned DEFAULT NULL,
`versionno` mediumint(8) unsigned DEFAULT NULL COMMENT 'starts from 1',
`isDeleted` tinyint(4) DEFAULT '0' COMMENT 'boolean',
`isDeletionRequested` tinyint(4) DEFAULT '0' COMMENT 'boolean',
PRIMARY KEY (`companyid`),
UNIQUE KEY `companyname` (`companyname`),
UNIQUE KEY `companyshortname` (`companyuid`),
KEY `FK_company_companytype` (`companytypeid`),
KEY `FK_company_companystatus` (`companystatusid`),
CONSTRAINT `FK_company_companystatus` FOREIGN KEY (`companystatusid`) REFERENCES `companystatus` (`companystatusid`) ON UPDATE CASCADE,
CONSTRAINT `FK_company_companytype` FOREIGN KEY (`companytypeid`) REFERENCES `companytype` (`companytypeid`) ON UPDATE CASCADE
)
Firmi prego dentro per inbandierare questo come inadeguato.