Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A multinational company has offices (sites) in several cities. Each site has one or more departments (accounting, research, production, etc.). Every employee works at
A multinational company has offices (sites) in several cities. Each site has one or more departments (accounting, research, production, etc.). Every employee works at some site in a particular department. Every department at each site has a manager. Each employee undergoes an evaluation and the result of his or her evaluation is composed of 'grade' which is an integer between 0 and 10 for various criterion: efficiency, productivity, innovation, inter-personal relation etc. The schema is given as follows: (Primary keys are underlined and Foreign keys have same attribute names) Department (Dep_id, Dep_name) Site (Site_id, Site_name, City, Country) Site Department (Site_id, Dep_id) Manager (Site_id, Dep_id, Emp_id) Employee (Emp_id, start_date, Site_id, Dep_id, salary) Evaluation (Emp_id, C_id, grade) Criterion (C_id, C_name) 1. Write python code to create a database and the tables for the above schema. Assume appropriate data type for all attributes and specify primary and foreign key constraints. (8 points)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started