Primary key for Manipulation relation

1 view
Skip to first unread message

Ankit Mutha

unread,
Feb 26, 2014, 8:41:38 PM2/26/14
to BG-Social...@googlegroups.com
Hi All,

I have a question regarding the manipulation relation.

As per the relational data model on the BG website, the manipulation is represented as:

Manipulation (mid, modifierid, rid, resourcecreatorid, timestamp, type, content)
 
This relationship is used in three of the BG actions:

public abstract int viewCommentOnResource(int requesterID, int profileOwnerID, int resourceID, Vector<HashMap<String,ByteIterator>> result);
public abstract int postCommentOnResource(int commentCreatorID, int resourceCreatorID, int resourceID, HashMap<String,ByteIterator> values);
public abstract int delCommentOnResource(int resourceCreatorID, int resourceID,int manipulationID);

My question is this:
What should be the primary key of Manipulation table?
Should it be a composite key(midmodifieridridresourcecreatorid) as specified in data model?

If so, why does delCommentOnResource and postCommentOnResource do not receive all the attributes of the composite key even though they are accessing a unique comment(or resource)? 

Please let me know if I am missing something.

Regards,
Ankit

Ankit Mutha

unread,
Feb 26, 2014, 8:47:11 PM2/26/14
to BG-Social...@googlegroups.com
Alternate way to represent Manipulation is to consider the manipulationID as the primary key.
If that is the case then, I have an issue while benchmarking. I get two duplicate manipulationID from BG.
Probably I am doing something wrong somewhere, any pointers could be helpful.

Sumita Barahmand

unread,
Feb 28, 2014, 10:07:58 AM2/28/14
to BG-Social...@googlegroups.com
The primary key for the manipulation table is the concatenation of manipulationID and resourceID. 

BG ensures that it generates unique manipulationIDs for each resource when posting comments, although it may generate the same manipulationID for multiple resources. That is why considering the concatenation of manipulationID and resourceID as the primary key for the manipulations relationship is important.

Sumita


--
You received this message because you are subscribed to the Google Groups "BG Social Benchmark" group.
To unsubscribe from this group and stop receiving emails from it, send an email to BG-SocialBenchm...@googlegroups.com.
Visit this group at http://groups.google.com/group/BG-SocialBenchmark.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages