Sunday, June 23, 2024

CST334 - Week 1

 

CST334 – Operating Systems

In week 1, I am working on a comprehensive review of the C-language syntax and functions. The C programming language is similar to C++, which I am familiar with. The first lab is beneficial for learning about shell debugging and using the GDB project debugger. Tracing the memory allocation issue was a great hands-on experience and reminded me of debugging in assembly language. For the project, I am learning how to code in C and use unit tests to verify that functions are working accordingly. I also had an opportunity to review the presented information regarding Unix and Linux.  By using Windows PowerShell, I tried some of the Linux shell commands to familiarize myself with them.

Additionally, I am learning about operating systems and how physical resources are managed through virtualization. The virtualizing of the CPU allows many programs to run at once, controlled by the resource manager and the OS policy. The OS manages the physical memory as a shred resource, allocating virtual address space for every process. In reviewing the provided material regarding systems architecture, the two main tasks of operating systems are abstraction layer and resource manager. In the abstraction layers, the operating system runs in Kernel mode to protect and allow the software to access the hardware directly. In contrast, the user mode prohibits direct access to hardware and isolates the sharing of memory, allowing programs running on user mode exclusive access to address space. Each layer in the system architect provides Application Program Interfaces (APIs) to access abstractions. Moreover, system calls control the transition from user to kernel mode, allowing programs to run without compromising the concept of abstraction.

 

Sunday, June 9, 2024

CST363 - Week 7

CST 363 Introduction to Database


In the previous weeks, the modules covered relational databases and the use of structured data. In Week 7, the course introduces the application and characteristics of non-relational databases. While MySQL is a database management system for relational databases, MongoDB is the leading NoSQL database platform for the non-relational databases. There are similarities between MongoDB and MySQL; both offer query languages to manipulate data to insert, retrieve, and update. Both offer scalability, although MongoDB supports sharding for horizontal scaling, while MySQL offers vertical scaling wit some chances of scaling horizontally.

The two systems have major differences in how data is stored. As a relational structured database, MySQL enforces a schema in support of transactional data. The data is stored in tables with columns and rows that strictly adhere to the relational data structure model. Logical constraints like primary key uniqueness, no duplicate rows, and unique column names are fundamental to MySQL's relational structure. Meanwhile, MongoDB doesn’t require a structured schema, providing more flexibility for data growth. Documents are stored in collections in a binary format called BSON.

The choice to use one over the other relies on several factors. For transactional data that requires controlled data consistency, MySQL and relational architecture provide ACID properties that ensure reliability. On the other hand, MongoDB meets the requirements for high-volume and high-rate-of-change databases like big data. Overall, each system offers unique advantages geared towards different needs.

Saturday, June 1, 2024

CST363 - Week 6




  CST 363 Introduction to Database


In week 6, the focus is on database programming. In this part of the course, I am learning about the difference between imperative and declarative languages and how to combine both to close the gaps in database programming. Syntax and paradigm gaps exist in database programming, and embedded SQL, procedural SQ, and API (application programming interface) are three techniques that offer solutions to syntax and paradigm gaps.

The embedded SQL technique is used in a host language and begins with the keyword EXEC SQL followed by the SQL statement. The compiler translates the SQL statements to the host language and then to an executable program. For the embedded SQL, establishing a connection between the host and the database is necessary to run queries. The connections within embedded SQL are managed by the three steps: 1- defining the connection name and login credentials, 2- set the connection to the database, and 3- terminate the connection and release any computing resources.

I also learned about the Java Database Connectivity or JDBC. The connection interface is created by calling the DriverManager.getConnection() method and passing the database information and login credentials as a parameter. The Statement interface is used for SQL query execution. A Statement object is created using createStatement() from the connection interface. The ResultSet interface retrieves the query results by returning a ResultSet object. PreparedStatement interface uses the prepareStatement() method in the connection interface by assigning a query. The PreparedStatement.executeQuery() prevents SQL injection attacks.

The most common technique is the API, which is a library of classes or procedures that connects the application programming language to a service host. One example of these libraries is JDBC, which contains the Java classes required to access the database. Most APIs can manage connections, prepare queries, execute queries for single and multiple rows, and call the stored procedure.

CST462S - Final Week

Service Learning Journal Reflections This marks the final week of our Service Learning experience. Our team successfully completed the final...