2.1.1 Sample Database
2.1.1 Sample DatabaseThroughout this documentation we will be working with a sample database to help explain some basic to advanced level database concepts.18.104.22.168 Sample Database InstallationWhen Advanced Server is installed a sample database named, edb, is automatically created. This sample database contains the tables and programs used throughout this document.The tables and programs in the sample database can be re-created at any time by executing the script, edb-sample.sql, located in the samples subdirectory of the Advanced Server home directory.
• Grants all permissions on the tables to the PUBLIC groupThe tables and programs will be created in the first schema of the search path in which the current user has permission to create tables and procedures. You can display the search path by issuing the command:22.214.171.124 Sample Database DescriptionEach employee has an identification number, name, hire date, salary, and manager. Some employees earn a commission in addition to their salary. All employee-related information is stored in the emp table.The sample company is regionally diverse, so the database keeps track of the location of the departments. Each company employee is assigned to a department. Each department is identified by a unique department number and a short name. Each department is associated with one location. All department-related information is stored in the dept table.The company also tracks information about jobs held by the employees. Some employees have been with the company for a long time and have held different positions, received raises, switched departments, etc. When a change in employee status occurs, the company records the end date of the former position. A new job record is added with the start date and the new job title, department, salary, and the reason for the status change. All employee history is maintained in the jobhist table.