Question 1

Given:

$cat file1
This is in file 1.

$cat file2
This is in file 2.

What does "cat file1 > file2" mean?

Choice 1. Replace content of file2 with file1.
Choice 2. Replace content of file1 with file2.
Choice 3. Cut the contents of file1 and append it in file2.
Choice 4. Remove file1 and create file2.

Question 2

The shell variable $? is automatically set by the shell to the exit status of the last command executed. When you execute echo $? and returns 1, it means that the exit status of the last command "succeeded". (True or False)

Question 3

In SQL DDL (data definition language) commands are used to define the structures of a database. The effects of DDL commands are permanently stored in a data dictionary. An example of DDL statement is:

CREATE TABLE aircraft
(serial_no INT(10),
model_no VARCHAR(15));

(True or False)

Question 4

By default MySQL runs with autocommit mode enabled (True or False).

Question 5

Provide a SQL statement to create a table with the following specifications:

Table Name: person
Attributes, Domain Types and Constraints:
Name, variable length, 15 characters, null values not allowed
Address, variable length, 15 characters, null values not allowed
Phone, variable length, 12 characters
*Primary Key: name

Question 6

Provide a SQL statement to create a table with the following specifications:

Table Name: employee
Attributes, DOmain Types and Constraints:
Name, variable length, 15 characters, null values not allowed
Salary, fixed point number, 10 digits, 2 decimal
Emp_No, smallint, unique, null values not allowed
*Primary Key: name
*Foreign Key: name
*References person(name)
Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.