i need code sql THE TABLES (PROJECT, DEPARTMENT, EMPLOY). • Each EMPLOY has (nemp, ID number, ndept, nproj,salary) NEMP NOT NULL VARCAHR(30) PRIMARY KEY, ID_NUMBER(10) NOT NULL, NDEPT VARCAHR(15), NPROJ VARCAHR(7) PRIMARY KEY, SALARY NUMBER(17). Requirements • Each PROJECT has (nproj, ndept,nemp) NPROJ VARCAHR(15) NOT NULL FOREGIN KEY KEY, NEMP VARCAHRH(30) PRIMARY KEY, NDEPT VARCAHR(10). • Each DEPARTMENT has(ndept, number nemp) Number NUMBER(3), NDEPT VARCAHR(30) NOT NULL, NEMP VARCAHR(15) FORGEIN KEY.
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
i need code sql
THE TABLES (PROJECT, DEPARTMENT, EMPLOY).
• Each EMPLOY has (nemp, ID number, ndept, nproj,salary) NEMP NOT NULL VARCAHR(30) PRIMARY KEY, ID_NUMBER(10) NOT NULL, NDEPT VARCAHR(15), NPROJ VARCAHR(7) PRIMARY KEY, SALARY NUMBER(17).
Requirements
• Each PROJECT has (nproj, ndept,nemp) NPROJ VARCAHR(15) NOT NULL FOREGIN KEY KEY, NEMP VARCAHRH(30) PRIMARY KEY, NDEPT VARCAHR(10).
• Each DEPARTMENT has(ndept, number nemp) Number NUMBER(3), NDEPT VARCAHR(30) NOT NULL, NEMP VARCAHR(15) FORGEIN KEY.
Entity Relationship
THE EMPOLY HAS A NEMP AND NPROJ AS PRIMARY KEY WILL CONACTED TO BOTH DEPARTMENT AND PROJECT AS FOREIGN KEY.
THE PROJECT HAS A NPROJ AS FORGIEN KEY WILL CONACTED TO EMPOLY AS PRIMARY KEY.
THE DEPARTMENT HAS A NEMP AS FORGIEN KEY WILL CONACTED TO BOTH EMPLOY AND
PROJECT AS PRIMARY KEY.
(RELASHINSHEP: EVERY DEPARTMENT has PROJECT and EVERY EMPLOY work on PROJECT and work in DEPARTMENT)
As per our company guidelines, only 3 sub parts will be answered. So, please repost the remaining questions separately.
Given three tables are: EMPLOY, PROJECT and DEPARTMENT. Each table contains it's own attributes along with their data types.
Step by step
Solved in 2 steps