what does "granularity" mean when speaking of database
I'm kinda confused what exactly does "granularity" or "grain"means in database world.
So I just understand that this means "it's a measure of level of details of your data in a database". It's how you could get a minimal grains of your data or how you could get a detailed information of your data that's make sense.
From Wikipedia, it means,
So I just understand that this means "it's a measure of level of details of your data in a database". It's how you could get a minimal grains of your data or how you could get a detailed information of your data that's make sense.
From Wikipedia, it means,
Data granularity
The granularity of data refers to the fineness with which data fields are sub-divided. For example, a postal address can be recorded, with low granularity, as a single field:
- address = 200 2nd Ave. South #358, St. Petersburg, FL 33701-4313 USA
or with high granularity, as multiple fields:
- street address = 200 2nd Ave. South #358
- city = St. Petersburg
- postal code = FL 33701-4313
- country = USA
or even higher granularity:
- street = 2nd Ave. South
- address number = 200
- suite/apartment number = #358
- city = St. Petersburg
- state = FL
- postal-code = 33701
- postal-code-add-on = 4313
- country = USA
Higher granularity has overheads for data input and storage. This manifests itself in a higher number of objects and methods in the object-oriented programming paradigm or more subroutine calls for procedural programming and parallel computing environments. It does however offer benefits in flexibility of data processing in treating each data field in isolation if required. A performance problem caused by excessive granularity may not reveal itself until scalability becomes an issue.
In addition to this, in computing it similarly means the same thing with database but it speaks mostly of the time the computing can handle. From Wikipedia, this means,
Computing
In parallel computing, granularity means the amount of computation in relation to communication, i.e., the ratio of computation to the amount of communication.
Fine-grained parallelism means individual tasks are relatively small in terms of code size and execution time. The data is transferred among processors frequently in amounts of one or a few memory words. Coarse-grained is the opposite: data are communicated infrequently, after larger amounts of computation.
The finer the granularity, the greater the potential for parallelism and hence speed-up, but the greater the overheads of synchronization and communication.[2]
In order to attain the best parallel performance, the best balance between load and communication overhead needs to be found. If the granularity is too fine, the performance can suffer from the increased communication overhead. On the other side, if the granularity is too coarse, the performance can suffer from load imbalance.
Hope this is helpful to you.
Comments