which is more accurate? and are they even right?

Database Systems: Design, Implementation, & Management
12th Edition
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Carlos Coronel, Steven Morris
Chapter8: Advanced Sql
Section: Chapter Questions
Problem 69C: Update the DETAILRENTAL table to set the values in DETAIL_RETURNDATE to include a time component....
icon
Related questions
Question
100%

Instructions:

Write the suitable SQL statement to answer the following questions based on the following tables ( image for better table)

Table Name: Employee
 EMP_ID             FNAME               LNAME               SALARY         JOIN_DATE              DEP_NO                     
101                  John                  Abraham            10000                   01-JAN-13          11             
202                  Michael                 Clarke                80000                  01-JAN-13          22            
303                       Roy                   Thomas              70000                  01-FEB-13          11             
404                     Tom                       Jose                  60000                   01-FEB-13          22             
505                        Jerry                    Pinto                 65000                   01-FEB-13               22             
606                    Philip                  Mathew              75000                  01-JAN-13          33                 
707                             Thomas              Jack           65000                  01-JAN-13          33

Table Name: Reward
 EMP_ID             REWARD_DATE               AMOUNT
    101                       01-FEB-13                       5000
     202                     01-FEB-13                        3000
303                          01-FEB-13                        4000
101                          01-JAN-13                        4500
202                          01-JAN-13                        3500

Table Name: Department
DEP_NO             DEP_NAME
 11                        Banking
22                         Insurance
33                         Services
44                        Marketing

 


the question is:
Write the DDL statement for defining the Employee table. 

(Assume that the Reward and Department tables have already been created)

my solution is this ( 

CREATE TABLE Employee (

EMP_ID CHAR(3) NOT NULL,
FNAME VARCHAR(15) NOT NULL,
LNAME VARCHAR(15) NOT NULL,
SALARY DECIMAL(10,2),
JOIN_DATE DATE
DEP_NO CHAR(2) NOT NULL
PRIMARY KEY(EMP_ID),
FOREIGN KEY(EMP_ID) REFRENCE Rewrad,
FOREIGN KEY(DEP_NO) REFRENCE Department
                                                                        );
)
my other solution is (

CREATE TABLE Employee (

EMP_ID INTEGER PRIMARY KEY,
FNAME VARCHAR2(15),
LNAME VARCHAR2(15),
SALARY INTEGER,
JOIN_DATE DATE,
DEP_NO INTEGER
                                                                        );
)

which is more accurate? and are they even right?



+Table Name: Employee
EMP ID
FNAME
101
John
202
Michael
303
Roy
404
Tom
505
606
707
Jerry
Philip
Thomas
LNAME SALARY
Abraham
Clarke
Thomas
Jose
Pinto
Mathew
Jack
Table Name: Reward
EMP ID REWARD DATE
101
01-FEB-13
20
01-FEB-13
303
01-FEB-13
101
01-JAN-13
202
01-JAN-13
10000
80000
70000
60000
65000
75000
65000
AMOUNT
5000
3000
4000
4500
3500
JOIN DATE
01-JAN-13
01-JAN-13
01-FEB-13
01-FEB-13
01-FEB-13
01-JAN-13
01-JAN-13
DEP NO
11
22
11
22
22
33
33
Table Name: Department
DEP NO DEP NAME
11
22
33
44
Banking
Insurance
Services
Marketing
Transcribed Image Text:+Table Name: Employee EMP ID FNAME 101 John 202 Michael 303 Roy 404 Tom 505 606 707 Jerry Philip Thomas LNAME SALARY Abraham Clarke Thomas Jose Pinto Mathew Jack Table Name: Reward EMP ID REWARD DATE 101 01-FEB-13 20 01-FEB-13 303 01-FEB-13 101 01-JAN-13 202 01-JAN-13 10000 80000 70000 60000 65000 75000 65000 AMOUNT 5000 3000 4000 4500 3500 JOIN DATE 01-JAN-13 01-JAN-13 01-FEB-13 01-FEB-13 01-FEB-13 01-JAN-13 01-JAN-13 DEP NO 11 22 11 22 22 33 33 Table Name: Department DEP NO DEP NAME 11 22 33 44 Banking Insurance Services Marketing
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Bare Bones Programming Language
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage