Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
modul:m290:learningunits:lu08:aufgaben:01 [2024/10/30 13:43] – angelegt vdemirmodul:m290:learningunits:lu08:aufgaben:01 [2024/11/20 11:40] (aktuell) cbolzern
Zeile 3: Zeile 3:
 ===== Requirements  ===== ===== Requirements  =====
   * Work type: Individual   * Work type: Individual
-  * Timeframe: 10 Minutes+  * Timeframe: 15 Minutes
   * Means of aid:    * Means of aid: 
       * Only teaching materials, no websearch, no use of ai.       * Only teaching materials, no websearch, no use of ai.
 +      * Webstorm Codeeditor
   * Expected result:    * Expected result: 
-    * Conduct the database schema (instance) as foundation for our employee's data. +    * A JavaScript program, that displays a greeting on the terminal of Webstorm.
-    * Establishment of a MySQL **table employees** including all relevant attributes.+
  
 ===== Assignments ===== ===== Assignments =====
 +As always, our first program on the server is a small script designed to greet the world with the infamous “Hello World”. 
  
-==== A: DATA SCHEMA ==== +  - Open your Webstorm editor and establish JavaScriptfile. Name ist //helloWorld.js//. The file extension is assigned automatically. 
-First of all we need database schema (database workspace). Execute the following two lines on your MySQL installation.+  - Write in this script your helloWorld statement, using the JS command //console.log()//Save your file. 
 +  - Generate more terminal outputs by using arrays, for iterations and console.log() function. e.g. //['Hello ', 'World!', 'Hello', 'Universe!'];// 
 +  - Open a terminal window by clicking the terminal-icon at the left lower rim of Webstorm. 
 +  - Install all missing JS packages, that Webstorm requires from you. 
 +  - Start your server by using the node command, e.g. //node helloWorld.js// 
 +  - If everything is correct, you will see the helloWorld statement as an output from your server in the bottom terminal window of Webstorm.
  
-  CREATE DATABASE hr_database; 
-  SHOW DATABASES; 
-  USE hr_database; 
- 
-==== B: CREATE TABLE ==== 
-To exercise the DML commands, we need a suitable table including a reasonable amout of data. The following SQL statement will create a table **employee** regarding all necessary attributes of an "average employee". 
- 
-  CREATE TABLE EMPLOYEES ( 
-    employee_ID INT PRIMARY KEY,       -- Employee ID as the primary key 
-    name VARCHAR(50) NOT NULL,         -- Name of the employee (max length 50 characters) 
-    surname VARCHAR(50) NOT NULL,      -- Surname of the employee (max length 50 characters) 
-    birthdate DATE NOT NULL,           -- Birthdate of the employee 
-    sex CHAR(1),                       -- Sex of the employee (M/F/O for other) 
-    pronomen VARCHAR(10),              -- Pronoun of the employee 
-    employment_date DATE NOT NULL,     -- Date when the employee was hired 
-    salary DECIMAL(10, 2) NOT NULL,    -- Salary of the employee (up to 10 digits, 2 decimal places) 
-    department VARCHAR(50) NOT NULL    -- Department where the employee works 
-  ); 
- 
-**Explanation** 
-  - **employee_ID** is the primary key and ensures that each employee has a unique ID. 
-  - **name** and **surname** are 'VARCHAR' fields that store the name and surname of the employee. 
-  - **birthdate** and **employment_date** use the 'DATE' data type to store the birth and employment dates. 
-  - **sex** is stored as a 'CHAR(1)' type to represent gender with one letter ('M' for male, 'F' for female, etc.). 
-  - **pronomen** stores the employee's pronouns. 
-  - **salary** is stored as a 'DECIMAL' value to account for financial precision. 
-  - **department** is a VARCHAR(50) field that stores the name of the department the employee is associated with. It has a NOT NULL constraint to ensure that every employee is assigned to a department. 
  
 ===== Solution ===== ===== Solution =====
-[[modul:m290:learningunits:lu07:loesungen:l01|Lösung]]+[[modul:m290:learningunits:lu08:loesungen:l01|Lösung]]
  
 ===== Vocabulary ===== ===== Vocabulary =====
 ^ English ^ German ^  ^ English ^ German ^ 
-preparatary work | Vorarbeit |+preparatory work | Vorarbeit 
 +| infamous | berühmt-berüchtigt |
  
  
 ---- ----
 [[https://creativecommons.org/licenses/by-nc-sa/4.0/|{{https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png}}]] Volkan Demir [[https://creativecommons.org/licenses/by-nc-sa/4.0/|{{https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png}}]] Volkan Demir
  • modul/m290/learningunits/lu08/aufgaben/01.1730292223.txt.gz
  • Zuletzt geändert: 2024/10/30 13:43
  • von vdemir