Tag: SQL

Dependencies in database

Database functional dependencies example Given the relation LDS (L, D, S) with the following functional dependencies definitions: LDS is decomposed into two relations: LD (L, D) and SL (S, L) which are populated as follows: Inserting the following row violates the functional dependency S, D -> L The question is how to enforce the the

Sql relational division example

Problem Given the following database tables Employee (SSN, name, location) Assigned (SSN, project_name, duration) Project (project_name, category, budget, location) Write SQL statements to find the following: Project names with a budget smaller than the average budget of projects in a given category let us say “Test Category” Employees who are assigned to all projects with