PHP Classes

File: Example/Tables/Table_Employee.md

Recommend this page to a friend!
  Classes of Stefan Kientzler   PHP MySQL Info to MD   Example/Tables/Table_Employee.md   Download  
File: Example/Tables/Table_Employee.md
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: PHP MySQL Info to MD
Generate a MySQL table structure Markdown report
Author: By
Last change:
Date: 1 year ago
Size: 2,700 bytes
 

Contents

Class file image Download

Table: Employee

Overview

Employee adresses

|Field|Type|Null|Key|Default|Comment| |-----|----|-|:-:|-------|-------| |lID|int|No|PRI|not set|Primary Key| |lSectionID|int|Yes|MUL|null|FK to Section table| |lEmployeeNr|int|No|UNI|not set|Unique employee number| |strFirstName|varchar(50)|No||empty|| |strLastName|varchar(50)|No||empty|| |strStreet|varchar(50)|No||empty|| |strPostcode|varchar(10)|No||empty|| |strCity|varchar(50)|No||empty|| |strCountry|varchar(50)|No||empty|country code (ISO 3166 ALPHA-2)| |dateBirth|date|Yes||null|birthday| |dateEntry|date|Yes||null|date of entry|

References to other Tables

|Column|Reference to|UPDATE|DELETE| |------|------------|------|------| |lSectionID|Section . lID|RESTRICT|RESTRICT|

Tables referencing this Table

|Column|Referenced by|UPDATE|DELETE| |------|-------------|------|------| |lID|Board . lEmployeeID|CASCADE|SET NULL|

Table Create Statement:

CREATE TABLE `Employee` (
  `lID` int NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
  `lSectionID` int DEFAULT NULL COMMENT 'FK to Section table',
  `lEmployeeNr` int NOT NULL COMMENT 'Unique employee number',
  `strFirstName` varchar(50) COLLATE utf8mb3_german2_ci NOT NULL DEFAULT '',
  `strLastName` varchar(50) COLLATE utf8mb3_german2_ci NOT NULL DEFAULT '',
  `strStreet` varchar(50) COLLATE utf8mb3_german2_ci NOT NULL DEFAULT '',
  `strPostcode` varchar(10) COLLATE utf8mb3_german2_ci NOT NULL DEFAULT '',
  `strCity` varchar(50) COLLATE utf8mb3_german2_ci NOT NULL DEFAULT '',
  `strCountry` varchar(50) COLLATE utf8mb3_german2_ci NOT NULL DEFAULT '' COMMENT 'country code (ISO 3166 ALPHA-2)',
  `dateBirth` date DEFAULT NULL COMMENT 'birthday',
  `dateEntry` date DEFAULT NULL COMMENT 'date of entry',
  PRIMARY KEY (`lID`),
  UNIQUE KEY `lEmployeeNr` (`lEmployeeNr`),
  KEY `lSectionID` (`lSectionID`),
  CONSTRAINT `Employee_ibfk_1` FOREIGN KEY (`lSectionID`) REFERENCES `Section` (`lID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_german2_ci COMMENT='Employee adresses'