Week 13: CST338 Week 5: Android & Markov Review
This week, we started learning Android databases using Room. Room simplifies database interactions by providing an abstraction layer over SQLite, the database engine embedded in Android devices. We learned that Room streamlines database operations by allowing us to work with Java objects instead of raw SQL queries.
Key concepts covered include:
- Room Architecture: Room consists of three main components: Entity, Data Access Object (DAO), and RoomDatabase. Entities represent database tables, DAOs define methods to access and manipulate data, and RoomDatabase acts as the access point to the database.
- Annotations: Room heavily relies on annotations like @Entity, @PrimaryKey, @ColumnInfo, @Dao, @Query, @Insert, @Update, and @Delete to define the structure and behavior of database entities and operations.
- SQL Fundamentals: We reviewed Structured Query Language (SQL), the standard language for managing relational databases. We explored essential SQL statements like CREATE TABLE, SELECT, INSERT, UPDATE, and DELETE, which are crucial for creating, retrieving, modifying, and removing data.
- Room Integration: We learned the steps involved in integrating Room into an Android project, including adding dependencies, defining entities, creating DAOs, and setting up the RoomDatabase.
This week's workload was substantial, likely the heaviest we've had in this class. One particularly demanding assignment involved Markov Text Generation. My team, Terrabit Solutions, and I took the opportunity to review each other's code for this assignment.
Our Approaches:
I approached the assignment by first planning out the solution and creating a UML diagram to visualize the relationships between methods. This approach streamlined the coding process and significantly reduced my development time. Gary, in contrast, dove straight into writing code, refining it as he progressed. Jess adopted a hybrid approach, combining elements of planning and immediate coding. Rahim began by outlining the solution in pseudocode.
My team members noted that my code generally aligns with the Google Java Style Guide, a practice I've recently started automating since learning about it in class.
Comments
Post a Comment