-- Create a new database (optional, good practice)
CREATE DATABASE IF NOT EXISTS StudentDB;
USE StudentDB;
-- ### Create Tables ###
CREATE TABLE Student (
StudentID INT PRIMARY KEY AUTO_INCREMENT,
Name VARCHAR(100) NOT NULL,
Dept VARCHAR(50),
Age INT,
Email VARCHAR(100) UNIQUE NOT NULL,
CHECK (Age > 16)
);
CREATE TABLE Course (
CourseID INT PRIMARY KEY AUTO_INCREMENT,
Title VARCHAR(100) NOT NULL,
Credits INT,
StudentID INT,
FOREIGN KEY (StudentID)
Question 1: S is a relation instance. If S has 6 tuples in it, then how many tuples are there in the result of the following SQL query? SELECT * FROM S S1, S S2;36 = 6 * 6
Question 2: Let R(A,B,C,D) be a relation, where (A, B, C) is the Primary Key of R, and attribute D cannot be NULL. Assume A’s domain has 5 different values, B’s domain has 2 , and C has 4, and D has 3. What is the maximum number of tuples that can be in an instance of R? 40 = 5 * 2 * 4 (Primary Key is unique)
Question 4:
Law of Diminishing Marginal Productivity: Extra output per worker eventually decreases as more workers are added to fixed capital.
Long Run: All inputs can be changed; firm can adjust labor, capital, etc. to optimize production
Economic Profit = Revenue − Costs (explicit + implicit)
Implicit costs: Value of forgone alternatives
Explicit cost = actual money paid for inputs
When marginal productivity falls → marginal cost rises.
Marginal Product (Labor): Extra output from one more worker.
Average
1. Первые князья Древней Руси (Олег, Игорь и Святослав) проводили активную внешнюю политику. Например, Олег совершил поход на Царьград в 907 году и подписал выгодный договор с Византией. Игорь уделял внимание сохранению господства Киева над восточнославянскими племенами, а Святослав
Addressing Modes in 8085 Microprocessor Addressing modes refer to the ways in which an instruction specifies the location of its data (operand). The 8085 microprocessor supports several addressing modes to access data efficiently based on program needs. Understanding these modes is essential for instruction execution and memory handling in assembly programming. 1. Immediate Addressing Mode In this mode, the actual data (operand) is provided directly within the instruction itself. The processor does...
MWERGE SORT
#include <stdio.h>
void merge(int a[], int l, int m, int r) {
int i=l, j=m+1, k=0, b[100];
while(i<=m && j<=r) {
if(a[i]<a[j]) b[k++]=a[i++];
else b[k++]=a[j++];
}
while(i<=m) b[k++]=a[i++];
while(j<=r) b[k++]=a[j++];
for(i=l,k=0;i<=r;i++,k++) a[i]=b[k];
}
void mergesort(int a[], int l, int r) {
if(l<r) {
int m=(l+r)/2;
mergesort(a,l,m);
mergesort(a,m+1,r);
...
🌏 Environmental Systems & Agriculture
Agricultural System Components
Inputs: land, water, fertiliser, labour, energy, capital
Processes: cultivation, irrigation, grazing, harvesting
Outputs: food, fibre, waste, emissions, by-products
Key Drivers
Population growth, market demand, policy incentives, technology, climate.
Sustainability Principles
Efficiency: maximise yield per input.
Resilience: ability to recover from disturbance.
Circularity: reuse and recycle nutrients and energy.
Environmental
Cursorial: running adaptation; long limbs, reduced digits (e.g., pronghorn, cheetah).
Advantages: range, migration, predator–prey endurance.
Adaptations: longer distal limbs, reduced/fused bones, loss of clavicle.
Horse record: digit reduction → 1 toe = efficient endurance.
Ricochetal: bipedal hopping, elastic energy (kangaroo rat, jerboa); elastic recoil = energy savings, predator evasion.
Semi-fossorial: partial burrower (marmot, badger).
Fossorial: full burrower (mole, naked...
Resumo - Teoria Geral do Poder Público
1. Política e o Fato Político
• Política pode ser entendida como:
•Gestão: escolhas práticas para resolver problemas.
• Estratégia: decisões de certos sujeitos ou grupos ["política do partido").
• Fato politico: acontecimentos ligados ao exercicio do poder.
• Marcello Caetano: fato político é todo acontecimento ligado à instituição e exercício do poder político, ou seja, um fato social que nasce das relações humanas em sociedade.