


KEY ` idx_ReportsTo ` ( ` ReportsTo ` ) ,ĬONSTRAINT ` FK_employees_reports_to ` FOREIGN KEY ( ` ReportsTo ` ) REFERENCES ` employees ` ( ` EmployeeID ` ) KEY ` idx_employees_postalcode ` ( ` PostalCode ` ) , KEY ` idx_employees_lastname ` ( ` LastName ` ) , ` ReportsTo ` int ( 10 ) unsigned DEFAULT NULL , ` Notes ` mediumtext CHARACTER SET utf8 COLLATE utf8_unicode_ci , ` Photo ` varchar ( 50 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ' ' , ` Extension ` varchar ( 4 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ' ' , ` HomePhone ` varchar ( 24 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ' ' , ` Country ` varchar ( 15 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ' ' , ` PostalCode ` varchar ( 10 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ' ' , ` Region ` varchar ( 15 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ' ' , ` City ` varchar ( 15 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ' ' , ` Address ` varchar ( 60 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ' ' , ` TitleOfCourtesy ` varchar ( 25 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ' ' , ` Title ` varchar ( 30 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ' ' , ` FirstName ` varchar ( 10 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ' ' , ` LastName ` varchar ( 20 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ' ' , ` EmployeeID ` int ( 10 ) unsigned NOT NULL AUTO_INCREMENT , To create Employees table, run the following CREATE and INSERT INTO statement. Character type columns are defined as UTF8 to allow non English characters to be stored.LastName and PostalCode column each has a index defined to improve query performance.Indexing is to improve query performance when the column is used in a join on the same table. Indexes `idx_ReportsTo` is created for the foreign key column.This is a self-referencing foreign key where a column references another column in the same table. Foreign key (FK_employees_reports_to) is defined on ReportsTo column which references EmployeeID column in Employees table.VARCHAR columns are defined as NOT NULL with a DEFAUTL constraint ''.EmployeeID is also a column in Orders table as a foreign key column. PRIMARY KEY is EmployeeID and it's auto incremented.The Employees table stores staff data for people who work for the company. The Employees table in MySQL Northwind database
