- ✓Platform selection for a DBMS should consider factors including data volume, query complexity, licensing cost, cloud compatibility, and team expertise.
- ✓PostgreSQL is a powerful open-source relational DBMS with advanced features including support for JSON data, full-text search, and extensibility through custom types.
- ✓MySQL is widely used in web applications and offers excellent performance for read-heavy workloads, making it a popular choice for content-driven websites.
- ✓MongoDB's document model is intuitive for object-oriented developers and suits applications where data structures evolve frequently.
- ✓Development best practices including version control for database schemas, automated testing of stored procedures, and code review apply equally to database development.
Listen to the full episode inside the course. Enrol to access all 80 episodes, plus assignments, tutor support and Student Finance funding.
Start learning →Alex: Today we're looking at how to select a DBMS platform and build a production-quality database system. Sam, what factors drive platform selection?
Sam: Several interrelated factors. Data volume and growth rate: some platforms scale more easily than others. Query patterns: some databases are optimised for complex analytical queries, others for high-volume transactional workloads. Data structure: relational for structured data, document stores for variable-schema data, graph databases for highly connected data. Licensing cost: commercial databases like Oracle carry significant costs, while PostgreSQL and MySQL are open source. Cloud compatibility: is a managed cloud version available? And team skills: using a platform the team knows well reduces risk and onboarding cost.
Alex: Let's compare some of the main platforms at a practical level.
Sam: PostgreSQL is often the best default choice for new relational database projects. It's open source with a permissive licence, highly standards-compliant, and has an extremely rich feature set including support for JSON data alongside traditional relational features, full-text search, advanced indexing types, and extensibility through custom types and functions. It handles both OLTP, online transaction processing, and analytical workloads reasonably well.
Alex: How does MySQL compare?
Sam: MySQL is the world's most widely deployed open-source database, powering a huge proportion of the web. It's particularly well-regarded for read-heavy workloads and is the 'M' in the LAMP stack. Its performance for simple queries is excellent. However, historically it has been less strict about SQL standards compliance and has had fewer advanced features than PostgreSQL, though the gap has narrowed significantly in recent versions.
Alex: And MongoDB as a representative NoSQL option?
Sam: MongoDB is a document database that stores data as BSON, a binary form of JSON. Its flexible schema is a significant advantage when the data structure varies between records or when it evolves frequently during development. It's intuitive for developers coming from object-oriented programming because it maps well to how objects are structured in code. The trade-off is that it's weaker on complex joins and ACID transactions, though recent versions have significantly improved transactional support.
Alex: What does professional database development practice look like?
Sam: It looks like software development practice applied to databases. Schema changes are managed through migration scripts that can be version-controlled and run in sequence on any environment. Tests are written for stored procedures, triggers, and complex queries. Code review applies to SQL and database objects just as it does to application code. Documentation is produced and maintained alongside the code. And deployments are automated, repeatable, and reversible where possible.
Alex: What are the most common pitfalls in database development?
Sam: Insufficient indexing, leading to slow queries that perform full table scans. Insufficient testing, with bugs in data validation or constraint logic only discovered after data is corrupted. Schema changes deployed to production without testing on representative data volumes, which can cause unexpected locking or performance problems. And inadequate backup and recovery testing: having a backup is not the same as being able to recover from it, which should be tested regularly.
Alex: Thanks Sam. Next we look at database administration.