Solved

Estimating size of tuples

Posted on 2011-09-04
6
373 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 53

Expert Comment

by:Huseyin KAHRAMAN
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 53

Expert Comment

by:Huseyin KAHRAMAN
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
Get Database Help Now w/ Support & Database Audit

Keeping your database environment tuned, optimized and high-performance is key to achieving business goals. If your database goes down, so does your business. Percona experts have a long history of helping enterprises ensure their databases are running smoothly.

 

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 53

Expert Comment

by:Huseyin KAHRAMAN
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access - need to reduce row size 25 78
FrontEnd tools to create web database application 7 117
reverse engineer .sql from php files 11 67
Formating field inside mysql query 2 50
As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

710 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