Big table

1,976 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,976
On SlideShare
0
From Embeds
0
Number of Embeds
192
Actions
Shares
0
Downloads
44
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Big table

  1. 1. Google BigTable (highly scalable system)
  2. 2. Why? <ul><li>Scalability </li></ul>
  3. 3. BigTable? <ul><li>It’s a complete paradigm shift from rdbms </li></ul><ul><li>Physically located on google server </li></ul><ul><li>Its spread across in the servers </li></ul><ul><li>It’s not a relational database </li></ul>
  4. 4. How its solving the scalability…? <ul><li>The rows are maintained in alphabetic order ( lexicographic  order) </li></ul><ul><li>The row ranges are broken up into partitions called  tablets . </li></ul><ul><li>Tablets are distributed across servers for load balancing. </li></ul><ul><li>When requesting a query, its collected from minimal number of tablets and gathered as the result set. </li></ul>
  5. 5. How easy to use? class FIFA(db.Model): eMailId = db.StringProperty(default= 'Anonymous') country = db.StringProperty() comments = db.StringProperty() …………… def save( self, userId, choice, comments): fifa = FIFA() fifa.eMailId = userId fifa.country = choice fifa.comments = comments db.put(fifa) demo
  6. 6. Queries in BigTable <ul><li>Works based on indexes. </li></ul><ul><li>A query without index will not work. </li></ul><ul><li>Provides 2 interfaces for Querying the BigTable: </li></ul><ul><li>Query: </li></ul><ul><li>GQL Query </li></ul>
  7. 7. Query Class <ul><li>The Query class uses objects and methods to prepare queries. </li></ul>query = FIFA.all() query.filter( 'country', country) rs = query.fetch(fetchSize) Example:-
  8. 8. GQLQuery Class <ul><li>The GqlQuery class uses SQL-Like query </li></ul>query = GqlQuery ( &quot; SELECT * FROM FIFA WHERE country = :1 &quot;) rs = query.fetch(fetchSize) Example:-
  9. 9. Thank you.

×