Solved

Estimating size of tuples

Posted on 2011-09-04
6
371 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 51

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 51

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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

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 51

Expert Comment

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

Accepted Solution

by:
Dave Baldwin earned 500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (http://dev.mysql.com/doc/refm…
I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

840 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