Class Test_02
Class Test_02
Quiz-2
ID: Section Date:
1. Write an SQL query to create a table named employees with the following columns:
○ emp_id ,emp_name ,department ,salary ,hire_date,(2 Marks)
Include the necessary constraints to maintain data integrity (e.g., NOT NULL, CHECK,
and default values).
6. Using relational algebra, write an expression to find the names (emp_name) and hire
dates (hire_date) of employees who work in the 'Finance' or 'HR' departments and
have a salary greater than 5,000. Assume the employees relation has the following
attributes: emp_id, emp_name, department, salary, and hire_date. (3 Marks)