Pandoc
Pandoc
Transactional Tables 6
Lookup Tables 6
Hybrid Tables (Mixed Usage) 7
Key Observations: 7
Relationship Analysis and MongoDB Schema Design 8
Inferred Relationships 8
Proposed MongoDB Schema 8
Mapping of Relational Tables to MongoDB Collections 13
Schema Design Considerations 14
Transactional Tables
These tables store business events, changing data, and have high write activity:
1. RwStop (127.3GB) - Very large transaction log for stop/termination events
2. RwPushLogs (60.4GB) - High-volume notification/message delivery logs
3. RwSession (34.4GB) - User session data with frequent writes
4. RwHistory (44.9GB) - Historical transaction records with recent modifications
5. RwLog (5.6GB) - System activity logs
6. RwPurchases (4.9GB) - Customer purchase transactions
7. RwPurchaseLog (967MB) - Purchase event logging
8. RwRefreshTokens (789MB) - Authentication token transactions with recent creation
9. RwRoute (2.3GB) - Route/navigation transaction records
10. RwMail (971MB) - Email transaction records with high utilization
11. RwAccount (524MB) - User account transactions with recent modifications
12. RwSchedule (427MB) - Scheduling transactions
13. RwPurchaseAddOns (336KB) - Recently created add-on purchase transactions
14. RwStopAddOns (55MB) - Recently created add-on stop records
15. RwWorkerStatus (524KB) - Worker activity status with recent modifications
16. RwWorkerOps (254KB) - Worker operations logs
Lookup Tables
These tables store relatively static reference data with less frequent updates:
1. RwSite (11.0GB) - Site configuration data (large but infrequently modified)
2. RwUser (7.1GB) - User reference data (larger lookup table)
3. RwInstall (2.7GB) - Installation reference information
4. RwBlobInfo (2.8GB) - Binary object reference data
5. RwJob (2.2GB) - Job definition data (not modified since 2014)
6. RwSubStatus (1.6GB) - Subscription status reference
7. RwMatrix (246MB) - Reference matrix with very low utilization (20.3%)
8. RwMember (503MB) - Membership reference data
9. RwStats (481MB) - Statistical reference data
10. RwIdentity (13.8MB) - Identity reference information
11. RwZone (459KB) - Zone definition data
12. RwZoneSite (418KB) - Zone-to-site mapping
13. RwConfig (16KB) - System configuration settings
14. RwSub (41KB) - Subscription reference data
15. RwZone2 (16KB) - Secondary zone definitions
16. sysdiagrams (73KB) - System diagram references
Key Observations:
1. Heavy Transactional Activity:
• The largest tables (RwStop, RwPushLogs, RwSession, RwHistory) are all transactional
• These four tables alone account for ~267GB (over 85% of total data)
2. Lookup Reference Pattern:
• Lookup tables generally show:
‣ Lower update frequency
‣ Creation and modification dates often close together
‣ Lower space utilization in many cases
‣ Smaller size (with exceptions like RwSite and RwUser)
3. Recent Development Focus:
• New transactional tables for purchases and add-ons
• Authentication-related transactions (RwRefreshTokens)
• Worker status monitoring
The schema design consolidates related tables to reduce redundancy and take advantage of
MongoDB's document model, while preserving the necessary relationships between entities.