Appearance
What are databases?
What is a database?
- Organized collection of data
- Designed for efficient storage, retrieval and modification
- Data is structured
- Tables, documents, graphs, etc.
- Managed by database software (DBMS)
- Supports multiple users and applications
- Provides data integrity, consistency and security
Where are databases used?
- Web applications
- Mobile applications
- Financial systems and banking
- E-commerce
- Data-analytics and reporting
- IoT and sensor data systems
- Healthcare systems and patient records
Different database types
- Relational databases
- Table based, fixed schema
- Document databases
- JSON/XML documents, flexible schema
- Key-value stores
- Simple key -> value access
- Column-oriented databases
- Optimized for analytics
- Graph-databases
- Nodes and relationships
- Time-series databases
- Optimized for time-stamped data
- In-memory databases
- Data stored primarily in RAM
SQL databases vs NoSQL databases
SQL databases
- Usually relational
- More traditional
- Data structured as tables
- Transactions
- Strong data consistency
NoSQL databases
- Relations often optional
- Data can be unstructured
- Do not use SQL (no-sql)
- Database specific API
- Data consistency is often event level
- One operation at time
Relational database software
Free software
- MySQL
- Owed by Oracle
- Commercial and GPL licenced
- MariaDB
- Used on this course
- Open source fork of MySQL
- Pretty much drop-in replacement for MySQL
- PostgreSQL
- Open source, more features than MySQL / MariaDB
- SQLite
- Small / simple
- Directly supported for example in Python core libraries
Commercial
- Oracle
- Microsoft SQL Server
- MySQL
MariaDB
- Open source fork of MySQL
- Created when Oracle bought the MySQL
- Same creator as original MySQL has
- Tries to maintain compatibility with MySQL
- Many open source projects have switched to MariaDB
- Has new features that MySQL does not have