- Person Accounts: 4kb
- Park Identities: 2kb
2024-02-23
n <- 3000000 # 3m c <- 0.5 a <- 3
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
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
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