• Home
  • Blog
  • Consider the following HBase table design for blogs.  On the website, logged in users (who all have a unique, integer…

Consider the following HBase table design for blogs.  On the website, logged in users (who all have a unique, integer…

0 comments

Consider the following HBase table design for blogs.  On the website, logged in users (who all have a unique, integer user ID) may comment on blog posts.

 

 

cf: meta

cf: comments

post11356

user: 3

content: …

1: <uid, comment>

2: <uid, comment>

post11357

user: 7

content: …

 

 

post11358

user: 5

content: …

1: <uid, comment>

 

post11359

user: 3

content: …

1: <uid, comment>

2: <uid, comment>

 

For each query below, state either YES or NO the schema is optimal for that query.  If you state NO, re-design the schema (copy the table above and modify it, then explain in English what is different with the new schema) so it is optimal for that specific query.

 

 

a) Given a particular blog post, what are all of the comments associated with it?yes

 

 

 

 

 

 

 

b) What are the blog posts for a particular user?

 

 

 

 

 

 

 

c) What comments has a particular user posted?

 

 

 

 

 

 

 

d) Deleting a particular blog post and all related data.

 


 

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}