Hi, Using referential integrity when ever possible is the best practice and it will be a good option to enhance query performance as well. Yes of cause it will be useful in cascade deleting (as you do not need to delete depended data from all the child tables manually) Other than that, it will enhance the performance of your SQL queries specially when you have joins with multiple tables.
And mysql, ms-sqlserver and oracle all support cascade deleting but make sure you use the correct syntax in you DDL statement. On Tue, Jul 7, 2015 at 6:13 PM, Sasikala Kottegoda <sasik...@wso2.com> wrote: > Hi Hasitha, > > In a durable topic scenario, for each message received from the publisher, > we generate a number of messages that is equal to the number of durable > subscriptions (with different message IDs). > Therefore, we have each content entry associated to a unique metadata > entry. So I think cascade delete will not be a problem. > > Thank you > > On Tue, Jul 7, 2015 at 3:15 PM, Hasitha Amal De Silva <hasit...@wso2.com> > wrote: > >> Hi guys, >> >> In a durable topic scenario, say we have 2 subscribers A and B, do we >> maintain 2 entries for the same message content @ message_content table ? >> If we refer to the same message_content entry for both subscribers, be wary >> of cascade deletes. >> >> Thanks >> >> On Fri, Jun 26, 2015 at 3:06 PM, Anuja Herath <an...@wso2.com> wrote: >> >>> Hi Sasikala, >>> >>> Since we dropped cassandra, this will enable us to use full power of >>> RDBMS. >>> But make sure that mentioned operations will work on MySQL, MS SQL and >>> oracle in the same way. >>> >>> Thanks, >>> Anuja >>> >>> On Fri, Jun 26, 2015 at 2:56 PM, Sasikala Kottegoda <sasik...@wso2.com> >>> wrote: >>> >>>> Hi all, >>>> >>>> Currently our database schema does not support referential integrity >>>> between the tables MB_CONTENT (which stores message contet) and MB_METADATA >>>> (which store message metadata). But message content with no related >>>> metadata is meaningless. >>>> >>>> To address this problem, what we have done is deleting message content >>>> along with metadata. >>>> >>>> But if we have have a foreign key relationship between the two tables, >>>> we will be able to ensure that no message content will be left without >>>> metadata associated. Also, it will reduce the number of database calls that >>>> are made thus speeding up the process. >>>> >>>> Any comments? >>>> >>>> Thank you. >>>> -- >>>> Sasikala Kottegoda >>>> *Software Engineer* >>>> WSO2 Inc., http://wso2.com/ >>>> lean. enterprise. middleware >>>> Mobile: +94 774835928/712792401 >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> Dev@wso2.org >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> Anuja Herath >>> *Software Engineer* >>> *WSO2, Inc.* >>> Mobile : +94 (0)71 429 8861 >>> >>> _______________________________________________ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Cheers, >> >> Hasitha Amal De Silva >> Software Engineer >> Mobile : 0772037426 >> Blog : http://devnutshell.tumblr.com/ >> WSO2 Inc.: http://wso2.com ( lean.enterprise.middleware. ) >> > > > > -- > Sasikala Kottegoda > *Software Engineer* > WSO2 Inc., http://wso2.com/ > lean. enterprise. middleware > Mobile: +94 774835928/712792401 > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Lahiru Cooray* Software Engineer WSO2, Inc.;http://wso2.com/ lean.enterprise.middleware Mobile: +94 715 654154
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev