Notes, summaries, assignments, exams, and exercises for Computer science for Other courses

Database Query Processing: Steps, Optimization, and Cost Models

Computer science2.8 KB

Database Query Processing: Steps and Cost Estimation

Query processing in a Database Management System (DBMS) involves several steps to transform a high-level query (such as an SQL query) into an efficient execution plan. Understanding these stages is crucial for database performance tuning.

Key Stages of Query Processing

The process typically follows these four major steps:

  1. Parsing and Translation
  2. Query Optimization
  3. Evaluation/Execution Plan Generation
  4. Query Execution

1. Parsing and Translation

Objective: Convert the SQL query into an internal representation, usually a parse tree or Abstract Syntax Tree (AST).

  • The SQL query is checked for syntactic correctness.
  • The SQL query is parsed into a parse tree.

Cost Estimation Techniques for Query Optimization

Cost...

Continue reading "Database Query Processing: Steps, Optimization, and Cost Models" »

Computer Network Communications

Computer science2.52 KB

Processor Front

The processor front involves three components: source, destination, and message. The source (e.g., a terminal or computer) sends a message. The destination (e.g., another terminal or computer) receives the message. The front-end processor acts as the connection between the source and destination, managing the message transfer. It frees the host processor from communication tasks, handling message routing, transmission monitoring, code translation, and encryption. All data transmitted to or from the host processor are managed through this specialized front-end processor, allowing the host processor to operate more efficiently and focus on application processing.

Types of Communications

A network enables computer connections to share...

Continue reading "Computer Network Communications" »

Mastering GIS Operations: Essential Techniques and Troubleshooting

Computer science4.81 KB

Activating the Buffer Function in GIS

If you want to implement the buffer function and it is not active, what must you do to activate it? You must designate the units as follows:

  • View -> Properties

Cartographic considerations must be made before an operation. The influence or buffer area must be activated as units are working.

Modifying Erroneous Values in a GIS Database

How can you modify an erroneous value in a database?

  1. Table / Start Editing
  2. With the pen tool, change the invalid data.
  3. Table / Stop Editing

Deleting a Field in a GIS Database

How do you delete a field in a database?

  • Edit / Delete Field

Deleting a Record in a GIS Database

How can you delete a record in a database?

  • Edit / Delete Records

Invoking the Clip Command

What is required to invoke...

Continue reading "Mastering GIS Operations: Essential Techniques and Troubleshooting" »

Cryptography Fundamentals: DES, AES, RSA and Security

Computer science6.12 KB

1. DES Structure

DES (Data Encryption Standard) is a symmetric key block cipher used for data encryption. It encrypts 64-bit plaintext using a 56-bit secret key.

DES uses a 16-round Feistel structure. The plaintext first undergoes initial permutation and is divided into left and right halves. In every round, the right half is processed using a round function and XORed with the left half. After 16 rounds, a final permutation is performed to generate the ciphertext.

Features

  • 64-bit block size
  • 56-bit key
  • 16 rounds
  • Uses Feistel structure

Advantages

  • Simple implementation
  • Efficient hardware encryption

Disadvantages

  • Weak against brute-force attacks

2. AES Algorithm

AES (Advanced Encryption Standard) is a symmetric encryption algorithm used to secure digital communication....

Continue reading "Cryptography Fundamentals: DES, AES, RSA and Security" »

Common Types of Computer Malware Explained

Computer science6.04 KB

1. Boot Sector Virus

  • It is a type of virus which infects the master boot record (portion of the hard disk which helps to load the OS) or hard disks.
  • The infected code runs when the system is booted from an infected disk.
  • They infect at a BIOS level (BIOS checks hardware and loads the OS).
  • They use DOS commands (text-based commands used to perform tasks such as file management, disk management, and running programs) to spread to other floppy disks. Since floppy disks are rarely used now, the propagation of boot sector viruses has almost ended.
  • With the boot-sector safeguards in operating systems, boot-sector viruses can no longer infect computers.
  • This virus can infect a computer only during boot-up. Once the system has started and the OS is running,
...
Continue reading "Common Types of Computer Malware Explained" »

Operating System Memory Management and Deadlock Prevention

Computer science6.41 KB

Operating System Memory Management Fundamentals

The Operating System (OS) is responsible for crucial memory decisions: determining which programs reside in memory, where they are placed, how memory is protected, and what actions to take when memory resources are exhausted.

Parkinson's Law Applied to Computing

Parkinson’s Law states that programs expand to fill the memory available to hold them.

Models for Organizing Memory

Three primary models exist for structuring memory:

  • Model A (User on Top, RAM on Bottom):
    • Pros: Fast execution.
    • Cons: No protection (e.g., used in MS-DOS).
  • Model B (ROM on Top, User on Bottom):
    • Pros: OS protected.
    • Cons: Slow and not flexible.
  • Model C (Drivers at Top, User in Middle, RAM at Bottom):
    • Pros: Fast and secure.
    • Cons: Complex
...
Continue reading "Operating System Memory Management and Deadlock Prevention" »

Machine Learning Algorithms: Comprehensive Definitions

Computer science13.82 KB

Support Vector Machines (SVM)

A support vector machine is a supervised method for classification or regression that seeks a boundary in a high-dimensional space which separates classes with the widest possible margin. The training process involves choosing a boundary that maximizes the distance to the nearest training points, known as support vectors. When data are not perfectly separable, slack variables can be introduced to allow some misclassifications or margin violations while balancing margin maximization and classification accuracy. A kernel is a special function that effectively maps data into higher-dimensional spaces without doing the mapping explicitly; it lets the support vector machine handle nonlinear relationships by measuring...

Continue reading "Machine Learning Algorithms: Comprehensive Definitions" »

Java Programming Concepts and Examples

Computer science10.2 KB

Palindrome

  1. Start
  2. Read the string
  3. Calculate the length of the string
  4. Initialize rev
  5. Initialize i=length=1
  6. Repeat until i>=0
    1. rev=rev+char at position I of the string
    2. i=i-1
  7. If string=rev:print “palindrome”
  8. Else print “not palindrome”
  9. Stop

import java.util.Scanner; import java.util.Scanner; class Test { public static void main(String args[]){ Scanner sc = new Scanner(System.in); System.out.print("Enter the String:"); String str = sc.nextLine(); int flag = 0; int len = str.length(); for(int i=0;i


Inheritance

  1. Create a class employee with given variables and method print the salary
  2. Create two sub classes of class employee named officer and manager include the variable specilaization in officer class and department in manager class
  3. Create a class with main
...
Continue reading "Java Programming Concepts and Examples" »

Understanding Binary Search Trees, Red-Black Trees, AVL Trees, Hash Tables, and HashMaps

Computer science40.07 KB

Binary Search Tree (BST)

Binary search tree (BST) is a tree in which all nodes follow the below mentioned properties:

  1. The left sub-tree of a node has a key less than or equal to its parent node's key.
  2. The right sub-tree of a node has a key greater than or equal to its parent node's key.
  3. Binary search tree (BST) divides all its sub-trees into two segments: left sub-tree and right sub-tree and can be defined as left_subtree (keys) ≤ node (key) ≤ right_subtree (keys).

Red-Black Tree

A red-black tree is a binary search tree in which each node is colored red or black. The root is black. The children of a red node are black. Every path from the root to leaf has the same number of black nodes and all leaves are black.

AVL Tree

Adelson, Velski & Landis

...
Continue reading "Understanding Binary Search Trees, Red-Black Trees, AVL Trees, Hash Tables, and HashMaps" »