Notes, summaries, assignments, exams, and exercises for Computer science for University

Relational Database Design and Normalization Principles

Computer science2.73 KB

Design of Relational Databases

The first step in creating a database is planning the type of information to be stored, taking into account two aspects: the information available and the information we need. Planning the structure of the database, including tables, is vital for its effective management.

Understanding Table Structure

The design of the structure of a table is a description of each of the fields that make up the registry and the values or data containing each of these fields. Fields are the different types of data that make up the table; for example: name, surname, and address. The definition of a field requires: the field name, field type, field width, etc. The records provide the information to be contained in the fields of the...

Continue reading "Relational Database Design and Normalization Principles" »

Drawing Polygons with Bresenham's Algorithm in C

Computer science5.19 KB

This program demonstrates how to draw polygons using Bresenham's line algorithm in C. It utilizes the graphics.h library for graphics operations.

Code Overview

The program consists of several functions:

  • main: The main function initializes the graphics mode, reads polygon coordinates, draws the polygon, and waits for a mouse click before closing the graphics window.
  • mostrarEjes: Draws the X and Y axes on the screen.
  • leerCoordenadasPoligono: Prompts the user to enter the number of vertices and their coordinates for the polygon.
  • dibujarPoligono: Iterates through the vertices and draws the polygon by connecting consecutive points using Bresenham's line algorithm.
  • lineaBresenham: Implements Bresenham's line algorithm to draw a line between two points.
  • dibujarPunto:
...
Continue reading "Drawing Polygons with Bresenham's Algorithm in C" »

Data Flow and Use Case Diagrams: Systems Analysis Essentials

Computer science2.62 KB

Data Flow Diagrams (DFD)

A Data Flow Diagram is a tool that allows for the graphical analysis and representation of an organization's processes.

Core DFD Elements

  • Process: Indicates the actions the system must perform. It must have at least one input and one output, and the name should begin with an infinitive verb.
  • Entities: All actors connected to the system, such as departments, organizations, or other systems.
  • Files: Clusters of information that store data within the organization.
  • Flow: Indicates the data moving through processes, representing inputs and outputs.

Common DFD Anomalies

  • Black Hole: A process that only receives information and does not send any.
  • Miracle: A process that only sends information without receiving any.

Object-Oriented Design

...
Continue reading "Data Flow and Use Case Diagrams: Systems Analysis Essentials" »

WAN, Switching, and DSL Technologies: Understanding Network Connections

Computer science3.51 KB

Understanding Wide Area Networks (WANs)

A WAN (Wide Area Network) spans a large geographic area, sometimes a country or continent. It contains a collection of machines dedicated to running user programs. These machines are called Hosts. The hosts are connected by a communication subnet. The subnet's job is to conduct messages from one host to another. The separation of the unique aspects of the communication network (subnet) and areas of application (hosts) greatly simplifies the overall design of the network.

Key Components of a WAN

  • Switching Computers (ECD): Each ECD uses a protocol responsible for routing the data correctly and providing support to computers and end-user terminals connected to it.
  • Computer User (DTE): The DTE support function
...
Continue reading "WAN, Switching, and DSL Technologies: Understanding Network Connections" »

Operating System Core Concepts

Computer science3.83 KB

Operating System (OS)

Software that manages hardware resources and provides a high-level abstraction for the user.

Process

A program currently executing.

Multitasking System

An OS allowing multiple programs to run concurrently.

Multiuser System

An OS allowing simultaneous access for multiple users.

Command Interpreter (Shell)

A user interface program that executes commands.

System Calls

Interfaces (APIs) used by programs to request services from the OS.

Single-Tasking System

Allows only one job in memory at a time. The CPU is idle during I/O operations, as it cannot be used by another process when the current one accesses system resources.

Time-Sharing System

Allows multiple terminals connected to a central computer. Enables multiple processes to use the...

Continue reading "Operating System Core Concepts" »

Software Project Management: Risks and Models

Computer science2.35 KB

Electronic Communication includes email, electronic newsletters, and video conferencing systems.

Interpersonal Network involves informal discussions with team members and external individuals who may offer valuable insights or visions to aid the team.

Decomposition of the Problem

Decomposition of the problem, also known as partitioning or elaboration, is an activity based on core software requirements analysis. The level of decomposition is not intended to be complete. Instead, it is applied in two main areas: the functionality to be delivered and the process to be used for delivery.

PROCESS: The generic stages characterizing the software process—definition, development, and support—are applicable to all software.

Software Process Models

  • Linear
...
Continue reading "Software Project Management: Risks and Models" »

Digital Image Fundamentals: Representation, Color Models, and Acquisition

Computer science2.71 KB

Digital Images: An Introduction

With the advancement of technology, the use of images in computer systems has been increasingly employed. These applications are present in various fields, including:

  • Web pages and graphical interfaces
  • Multimedia programs and games
  • Educational programs and desktop publishing
  • Computer graphics and medicine
  • Computer vision and image processing

Thus, it becomes increasingly important that computer professionals acquire the necessary knowledge to effectively utilize this resource.

Representation of Digital Images

To better understand how images are acquired and stored, we must first examine how they are represented digitally. Representing an image involves modeling it so that its data can be interpreted by a computer.

The...

Continue reading "Digital Image Fundamentals: Representation, Color Models, and Acquisition" »

Artificial Intelligence: Agents, Environments, and Search Methods

Computer science4.24 KB

Core Concepts of Artificial Intelligence

Defining Key AI Components

  • Artificial Intelligence (AI): A study to perceive, reason, and act. Systems that think like humans, trying to understand how the human mind works. Systems based on rules.
  • Intelligent Agent: An entity capable of perceiving its environment, processing these perceptions, and responding or acting in that environment rationally and appropriately.
  • Prolog: A functional programming language based on logic.
  • Rational Agent: Agent = Architecture + Program. The program depends on the environment in which it operates.

Types of Intelligent Agents and Programs

The agent program dictates how the agent chooses its actions:

  1. Simple Reflex Agent

    Actions depend solely on the current perception and predefined

...
Continue reading "Artificial Intelligence: Agents, Environments, and Search Methods" »

ArcView Project Manager: Essential Functions and Operations

Computer science2.65 KB

ArcView Project Manager Components

The ArcView Project Manager organizes geographic data through several core components:

  • Views: Geographic data organized into interactive maps, each featuring an exclusive table of contents.
  • Tables: Tools to manage and manipulate attribute databases.
  • Statistical Graphs: Features to develop and display data visualizations.
  • Layouts: Flat compositions for printing, incorporating various graphical elements. These "intelligent" map compositions maintain a live link to the underlying data.
  • Scripts: Programmed frames written in Avenue, the native programming language and development environment for ArcView.

Accessing the Legend Editor

You can access the legend editor for a theme using these three methods:

  1. Double-click the
...
Continue reading "ArcView Project Manager: Essential Functions and Operations" »

TCP/IP Transport Layer Quiz: Port Numbers and Flow Control

Computer science4.11 KB

Chapter 4: Transport Layer Concepts

Networking Questions and Answers

  1. Transport Layer Header Analysis (Choose two)

    On the basis of the transport layer header shown in the diagram, which of the following statements describe the established session? (Choose two.)

    1. This is a UDP header.
    2. This contains a Telnet request.
    3. This contains a TFTP data transfer.
    4. The return of this packet will have a remote host acknowledgment number of 43,693.
    5. This is a TCP header.
  2. TCP/IP Well-Known Port Numbers Range

    In the TCP/IP data encapsulation, which range of port numbers identifies all known applications?

    1. 0–255
    2. 256–1022
    3. 0–1023
    4. 1024 to 2047
    5. 49,153 to 65,535
  3. Purpose of Port Numbers in TCP Header

    Why are port numbers included in the TCP header of a segment?

    1. To indicate the correct
...
Continue reading "TCP/IP Transport Layer Quiz: Port Numbers and Flow Control" »