2024-02-23

Storage Consumption Constants

  • Person Accounts: 4kb
  • Park Identities: 2kb

Variable Definitions and Estimates

  • n = number of customers
  • c = percentage of customers that have only visited one park
  • a = average number of parks visited by customers that have visited more than one park
n <- 3000000 # 3m
c <- 0.5
a <- 3

Option 1

Using one person account per customer record, and one “Park Identity” record per unique park visited, we can calculated the estimated storage required using the following formula: \[ \text{Storage} = (n \times 4 \text{kb}) + (n \times c \times 2 \text{kb}) + (n \times (1 - c) \times a \times 2 \text{kb}) \]

option1 <- function(n, c, a) {
  personAccountStorage = n * 4
  identityStorage = n * c * 2 + (n * (1 - c) * a * 2)
  return (personAccountStorage + identityStorage)
}
print(option1(3000000,0.75,3)/1024/1024) # conversion to GB
## [1] 20.02716

Option 2

Using one person account per unique park visited, we can calculate the estimated storage required using the following formula: \[ \text{Storage} = (4 \times n \times c) + (4 \times (1-c) \times a \times n) \]

option2 <- function(n, c, a) {
  return ((4 * n * c) + (4 * (1 - c) * a * n))
}
print(option2(3000000,0.75,3)/1024/1024) # conversion to GB
## [1] 17.16614

Threshold

At the 50% mark, both options are equal in terms of storage needs. However, if less than 50% of customers visit more than one park, Option 2 requires less storage but introduces duplicates.

print(option1(3000000,0.5,3)/1024/1024)
## [1] 22.88818
print(option2(3000000,0.5,3)/1024/1024)
## [1] 22.88818