Essential Principles of Database Management Systems

Data Models

A data model is a conceptual representation of data structures required for a database system. It defines how data is stored, organized, and manipulated.

Types of Data Models

  • Hierarchical Model: Arranges records in a hierarchy like an organization chart. Each record is a node; the top-most is the root. A child node can have only one parent, preventing multiple parent relationships.
  • Network Model: Similar to the hierarchical model, but a child node can have multiple parents. It supports many-
Read More

Essential Java Enterprise Development Concepts

1. Object Relational Mapping (ORM)

ORM is a technique used to map Java objects to database tables. It allows developers to interact with databases using objects instead of raw SQL queries. Example: Hibernate is a popular ORM framework.

Advantages of ORM

  • Reduced SQL Coding: Uses an object-oriented approach.
  • Improved Productivity: Faster development with less code.
  • Database Independence: Code works across different databases with minimal configuration changes.
  • Maintainability: Clean, manageable code.

2.

Read More

PIC Microcontroller C Programming Examples

Practical 1: LED Blinking Patterns

#include <xc.h>
#define _XTAL_FREQ 20000000

#pragma config FOSC = HS, WDTE = OFF, PWRTE = ON, LVP = OFF

void delay_ms(unsigned int time) {
    while(time--) __delay_ms(1);
}

void main(void) {
    ANSEL = 0x00; ANSELH = 0x00;
    TRISB = 0x00; PORTB = 0x00;
    while(1) {
        PORTB = 0xFF; delay_ms(500);
        PORTB = 0x00; delay_ms(500);
        PORTB = 0xAA; delay_ms(500);
        PORTB = 0x55; delay_ms(500);
    }
}

Practical 2: DC Motor Control

#
Read More

Python Programming Fundamentals and Practical Exercises

Lecture 1: Program Design

Flowchart and Pseudocode

  • Pseudocode: Abbreviated plain English version of actual computer code.
  • Symbols used in flowcharts are replaced by English-like statements.
  • Allows the programmer to focus on the steps required to solve a problem.

Hierarchy Chart

  • Shows the overall program structure.
  • Depicts the organization of the program, omitting specific processing logic.
  • Describes what each part, or module, of the program does.
  • Each module is subdivided into a succession of submodules.
Read More

Public synchronized int incContador (int val)

1

# Hw *8
addition = float(input(“Enter the annual addition of public residential land (in sq land):”))
years = 0 
current_total = initial_total 
while current_total < target_total:
    years += 1 
    private_residential = private_residential*1.03
    public_residential = public_residential + addition 
    current_total = private_residential + public_residential + rurual_settlement 

print(f”It will take at least {years} year(s) for the residential land in Hong Kong to double in size.”)

#cw

Read More

Essential Concepts in Big Data, AI, and Data Warehousing

Understanding RDD and Spark Operations

RDD (Resilient Distributed Dataset) is the fundamental data structure of Apache Spark. It is a fault-tolerant collection of elements distributed across multiple nodes in a cluster, designed for parallel processing.

Key Features of RDD

  • Distributed: Data is split across multiple machines.
  • Immutable: Once created, it cannot be changed.
  • Fault-tolerant: Lost data can be recomputed using lineage.
  • Lazy evaluation: Operations are executed only when needed.

RDD Operations

RDD

Read More