Introduction to databases
Wow, this one was pretty tough! I’ve just finished my MSc and started to work at my first job as a data scientist. And I thought that teaching other is much simpler than being taught. That was the biggest mistake I’ve ever made. Amount of work to prepare lectures and homework was really a challenge for me, so I spent almost all weekends during spring 2018, preparing lecture notes and reviewing homework.
Here a couple of lessons I have learned from this course:
- I have selected C# and .NET as the environment for course assignments, but my students were barely able to comprehend it. I can agree, that they should learn it even if it more complex than Python; but I also already bored of it after 5 years of .NET development. I guess I will use Python or Go for the next year assignments.
- Lectures are really much more interactive when you mix them with ad hoc practical assignments. On the lecture about aggregation, I have prepared a Kaggle dataset and we have a lot of fun querying it for different data slices.
- I prepared a functional test to check students solutions automatically, yet I still needed
to clone their code and start the test manually. This was a big overhead on these few actions.
I will use Travis or something like that to automate this process next year.
- Also, I made the test available for students and they really overused it. Many of them didn’t even bother to test their solutions manually.
Lecture notes
- DBMS 1
- DBMS vs filesystem
- Data abstraction
- Physical independence
- Relational data model
- Query 1
- Data manipulation languages
- SQL: SELECT, FROM, AS, WHERE, ORDER BY, LIMIT
- Relation algebra: selection, projection
- Modeling 1
- Data definition language
- Conceptual vs logical vs physical data models
- SQL data types
- Constraints
- Keys
- SQL: CREATE
- Writing 1
- SQL: INSERT, UPDATE, DELETE.
- Application 1
- System.Data: IDbConnection, IDbCommand, IDbReader, IDbDataAdapter
- ADO.NET
- Not Only SQL 1
- Why NoSQL: impendance mismatch, speed, big data
- Why SQL: single language, static typing, integrity control
- DBMS 2
- Backups
- Modeling 2
- Associations
- One-to-many
- Many-to-many
- One-to-one
- Foreign key
- Associations
- Query 2
- Cartesian product
- Join: inner, left, right, outer
- Views
- Application 2
- ORM
- Dapper.NET
- Linq2SQL
- EntityFramework
- DBMS 3
- Migrations
- Query 3
- Aggregation functions
- GROUP BY
- HAVING
- Modeling 3
- Normalization
- First normal form
- Second normal form
- Third normal form
- Normalized vs de-normalized
- Writing 3
- Transactions
- ACID
- Application 3
- SOLID
- Layered architecture
- Dependency injection
- IRepository
- DBMS 4
- Storage level
- DBMS file structure
- Database buffer
- Journaling
- Database engines
- Modeling 4
- Query optimization
- Data structures overview
- indexes
- Fulltext search
- JOIN strategies
- Not Only SQL 4
- NoSQL categories
- Key-value storage
- Wide column storage
- Document storage
- Graph storage