Programming Language Basics & Database Models
Classified in Computers
Written on in English with a size of 3.29 KB
Programming Language Fundamentals
Level Classification
- Low Level: Resembles the language used by the computer directly.
- High Level: Resembles human language, abstracting machine details.
Generations of Programming Languages
- 1st Generation (1GL): Machine Language
- 2nd Generation (2GL): Assembler
- 3rd Generation (3GL): High-level languages (e.g., Fortran, Pascal, C, C++, Cobol)
- 4th Generation (4GL): Languages for specific purposes (e.g., web development, PHP, Java, HTML)
Key Programming Concepts
Program
A set of instructions or orders based on a programming language that a computer interprets to solve a problem or perform a specific function.
Programming Language
Tools that allow us to create programs and software. An artificial language used to define a sequence of instructions that can be interpreted and executed on a computer.
Algorithm
A finite, ordered set of well-defined instructions or rules that enable an activity through unambiguous steps, generating successive results when executed.
Compiler
A computer program that translates a program written in one programming language (source code) into another programming language (target code), typically machine code, generating an equivalent program that the machine can interpret and execute.
Machine Language
The directly interpretable coding system for firmware on a circuit like a microprocessor or microcontroller (e.g., PLC). This language is composed of a set of instructions that determine actions to be taken by the machine.
Database Models
Hierarchical Data Model
A data model in which data is organized in a tree-like structure. The framework uses parent-child relationships: each parent can have many children, but each child has only one parent.
Network Model
A database model conceived as a flexible way of representing objects and their relationships. It allows each record to have multiple parent and child records, forming a lattice structure.
Entity-Relationship Model (ER Model)
Also known as ERD (Entity-Relationship Diagram), this is a modeling tool for databases proposed by Peter Chen in 1976. It aims to display the objects belonging to the database as Entities (corresponding to the concept of a class, where each tuple represents an object in object-oriented programming) which have attributes and are linked by relationships.
Cardinality Correspondence
Given a set of binary relations and sets of entities A and B, the cardinality correspondence can be:
- One-to-One (1:1): An entity in A is related to at most one entity in B, and vice versa.
- One-to-Many (1:N): An entity in A is associated with zero or many entities in B, but an entity in B is related to at most one entity in A.
- Many-to-One (N:1): An entity in A is associated with at most one entity in B, but an entity in B can be related to zero or many entities in A.
- Many-to-Many (N:N): An entity in A can be related to zero or many entities in B, and vice versa.