Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Estimating size of tuples

Posted on 2011-09-04
6
Medium Priority
?
376 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 59

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 59

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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

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 59

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
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

722 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