Computer Science BS Journal (CST363) : Week 8

 This journal entry marks the final days of CST363. What an amazing class. I really enjoyed working with MySQL Workbench. Mongo was a bit odd, but I liked the challenge of learning to use new software/get better with the command line. Our final prompt is to list 3 of the most important things we learned in this class. The three things I'll list are going to be Database design, Transaction & Concurrency, and JDBC & Spring Boot. 

I'll list the key learning takeaways for these as well as some useful information.

1. Database Design

Key Learning Takeaways:

  • Data Modeling:

    • Understand entities, attributes, and relationships.

    • Learn how to design ER diagrams to visualize database schemas.

  • Normalization:

    • Apply 1NF, 2NF, 3NF (and BCNF) to reduce redundancy and improve integrity.

    • Understand denormalization trade-offs for performance.

  • Schema Design:

    • Create well-structured primary and foreign keys.

    • Define constraints (NOT NULL, UNIQUE, CHECK) for data integrity.

    • Understand the difference between logical and physical design.

  • Indexing & Performance:

    • Use indexes to speed up queries.

    • Balance between read/write performance and index overhead.

  • Real-World Considerations:

    • Handle data types and naming conventions appropriately.

    • Design for scalability, security, and backup/recovery


2. Transactions & Concurrency

Key Learning Takeaways:

  • Transaction Basics:

    • Understand ACID properties (Atomicity, Consistency, Isolation, Durability).

    • Use BEGIN, COMMIT, and ROLLBACK effectively.

  • Concurrency Control:

    • Learn about race conditions and data anomalies (lost update, dirty read, etc.).

    • Explore locking mechanisms: shared vs exclusive, row-level vs table-level.

  • Isolation Levels:

    • Understand different levels: READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SERIALIZABLE.

    • Trade-offs between consistency and performance.

  • Deadlocks & Prevention:

    • Detect and resolve deadlocks.

    • Apply locking strategies, timeouts, and ordered access to reduce risk.

  • Optimistic vs Pessimistic Concurrency:

    • Choose based on application needs and data contention.


3. JDBC & Spring Boot

Key Learning Takeaways:

  • JDBC Fundamentals:

    • Use Connection, Statement, PreparedStatement, and ResultSet.

    • Handle SQL injection risks with parameterized queries.

    • Understand how to manage connections and close resources.

  • Spring JDBC:

    • Use JdbcTemplate for simpler and safer JDBC operations.

    • Handle transactions declaratively with @Transactional.

  • Spring Boot Integration:

    • Configure data sources with application.properties or YAML.

    • Use Spring Data JPA for ORM-based interactions.

    • Simplify CRUD with JpaRepository, custom queries, and query methods.

  • Exception Handling:

    • Understand Spring's DataAccessException hierarchy.

    • Translate SQL exceptions into meaningful application-level messages.

  • Performance and Connection Management:

    • Use connection pools (e.g., HikariCP).

    • Monitor query performance and optimize where needed.

Comments

Popular posts from this blog

Computer Science BS Journal: Week 4

Computer Science BS Journal: Week 2

Computer Science BS Journal: Week 5