Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Estimating size of tuples

Posted on 2011-09-04
6
Medium Priority
?
380 Views
Last Modified: 2012-05-12
If I have to estimate a size of tuples. Would I multiply them together? I am unsure how to approach this as I believe I would multiply them up. What strategy would you take with this? Thanks!

R1 has 1000, r2 has 1500, and r3 has 750
0
Comment
Question by:Rowley4
  • 3
  • 2
6 Comments
 
LVL 61

Expert Comment

by:HainKurt
ID: 36481799
can you please explain what you are trying to do
0
 

Author Comment

by:Rowley4
ID: 36481810
Say r1 (ABC, r2 (CDE) and r3 (EF) with primary keys A C and E. I wanted to estimate the sizes of these tuples if r1 has 1000 r2 has 1500 and r3 has 750?
0
 
LVL 61

Expert Comment

by:HainKurt
ID: 36481819
can ask more :) until somebody else answer your question

what is R1, R2, R3
are those tables? ABC, CDE, EF are columns? A C E are PK on each table?
R1 has 1000 means it has 1000 records (1000 unique A value)?

by tuple what do you mean, can you give samples...
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

Author Comment

by:Rowley4
ID: 36481958
Yes, you are exactly correct on all your assumptions.

Suppose we have
R(a,b) with T(R) = 1000 and V(R,b) = 20
S(b,c) with T(S) = 2000, V(S,b) = 50, and V(S,c) = 100
U(c,d) with T(U) = 5000 and V(U,c) = 500
What is the estimated size of R    S    U?
First join R and S (on attribute b):
estimated size of result, X, is T(R)*T(S)/max(V(R,b),V(S,b)) = 40,000
by containment of value sets, number of values of c in X is the same as in S, namely 100
Then join X with U (on attribute c):
estimated size of result is T(X)*T(U)/max(V(X,c),V(U,c)) = 400,000
0
 
LVL 61

Expert Comment

by:HainKurt
ID: 36482563
I am totally lost :)
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 36482661
Courtesy of 'paulsauve' on another question, from this page http://www.deeptraining.com/litwin/dbdesign/FundamentalsOfRelationalDatabaseDesign.aspx  :

"In fact, Codd (and other relational database theorists) use the terms relations, attributes and tuples where most of us use the more common terms tables, columns and rows, respectively (or the more physical—and thus less preferable for discussions of database design theory—files, fields and records)."

I just saw this about 5 minutes ago.  Til then I didn't know what 'tuples' were about either.  I don't know that it will help to answer this question because I believe too of what @Rowley4 is saying is still undefined.  If he is trying to find out how storage is required, the answer is simply the number of rows times the average or estimated size of the data.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question