Question

In: Computer Science

Database Systems Lab Exercises Populate the Dept table with the following: Dept_Code Dept_Name ICS Information and...

Database Systems

Lab Exercises

  1. Populate the Dept table with the following:

Dept_Code

Dept_Name

ICS

Information and Computer Science

COE

Computer Engineering

SWE

Software Engineering

SE

System Engineering

  1. Populate the Faculty table with the following:

Faculty_Id

Last_Name

First_Name

Dept

100234

Hashim

Ahmad

ICS

287234

Yoesuf

Mohammed

COE

767636

Amn

Faisal

ICS

557899

Hamzah

Yusuf

SE

345256

Lukman

Mousa

SWE

626277

Ali

Isa

COE

246266

Dawood

Ageel

SE

  1. Change the last name of Faculty Id = 767636 to "Ameen".
  2. Change the Dept of Mr. Ali to 'MGT'.
  3. Delete Faculty Id 557899.
  4. Delete Dept_Code 'SWE' on Dept table.

Solutions

Expert Solution

Below are the sql queries for given requirement

Query to populate Dept table

insert into Dept(Dept_Code, Dept_Name) values('ICS', 'Information and Computer Science');
insert into Dept(Dept_Code, Dept_Name) values('COE', 'Computer Engineering');
insert into Dept(Dept_Code, Dept_Name) values('SWE', 'Software Engineering');
insert into Dept(Dept_Code, Dept_Name) values('SE', 'System Engineering');

Query to populate Faculty table

insert into Faculty(Faculty_Id, Last_Name, First_Name, Dept) values(100234, 'Hashim', 'Ahmad', 'ICS');
insert into Faculty(Faculty_Id, Last_Name, First_Name, Dept) values(287234, 'Yoesuf', 'Mohammed', 'COE');
insert into Faculty(Faculty_Id, Last_Name, First_Name, Dept) values(767636, 'Amn', 'Faisal', 'ICS');
insert into Faculty(Faculty_Id, Last_Name, First_Name, Dept) values(557899, 'Hamzah', 'Yusuf', 'SE');
insert into Faculty(Faculty_Id, Last_Name, First_Name, Dept) values(345256, 'Luckman', 'Mousa', 'SWE');
insert into Faculty(Faculty_Id, Last_Name, First_Name, Dept) values(626277, 'Ali', 'Isa', 'COE');
insert into Faculty(Faculty_Id, Last_Name, First_Name, Dept) values(246266, 'Dawood', 'Ageel', 'SE');

Below are the sql statements.

Change the last name of Faculty Id = 767636 to "Ameen".

Update Faculty set Last_Name = 'Ameen' where Faculty_id = 767636;

Change the Dept of Mr. Ali to 'MGT'.

Update Faculty set Dept = 'MGT' where Last_Name = 'Ali';

Delete Faculty Id 557899.

DELETE FROM Faculty where Faculty_id = 557899;

Delete Dept_Code 'SWE' on Dept table.

DELETE FROM Dept where Dept_Code = 'SWE';


Related Solutions

Database Systems Lab Exercises Create a table Faculty based on the following chart: Column Data type...
Database Systems Lab Exercises Create a table Faculty based on the following chart: Column Data type Constraints Faculty_Id Number (6) Primary Key => faculty_pk Last_Name Varchar2(15) Not NULL First_Name Varchar2(15) Not NULL Dept Char(3) Save the SQL statement as ex1.sql. Confirm and validate the creation of the new table. Create a table Dept based on the following chart: Column Data type Constraints Dept_Code Char (3) Primary Key => dept_pk Dept_Name Varchar2(20) Not NULL Save the SQL statement as ex2.sql. Confirm...
Using Python, write a segment of code to populate the table "employee" of the database "EmployeeDB”...
Using Python, write a segment of code to populate the table "employee" of the database "EmployeeDB” with the data below. Import your choice of DB connector (import MySQLdb/sqlite3…) Create the“employee” table with schema = [name, address, age] Insert this employee: John Doe, 7001 E Williams Field, 32
Seeb Hospital provides the following information for the year of 2018. Dept. E Dept. F Dept....
Seeb Hospital provides the following information for the year of 2018. Dept. E Dept. F Dept. G Dept. H Budgeted Hours 10,000 8,000 21,000 1,000 Actual Hours 12,000 8,000 22,0 1,200 Yearly maintenance hours 40,000 Allocation Rate Budgeted maintenance hours Maintenance costs: Fixed OMR5,400,000 yearly Variable OMR30 per maintenance hour (9 Marks (0) Calculate the amount of maintenance cost budgeted for each department assuming a single-rate cost-allocation method was used
Solve each of the following systems by the eigenvalue method. If ICs are given, find the...
Solve each of the following systems by the eigenvalue method. If ICs are given, find the particular solution to the system. If no ICs are given, find the general solution. Write all solutions in vector form. x'1 = -2x1 + 5x2, x'2 = -6x1 + 9x2; x1(0) = 1; x2(0) = 3
Information on the following Database: create database Sales_Co use Sales_Co create table Vendor (v_code integer, v_name...
Information on the following Database: create database Sales_Co use Sales_Co create table Vendor (v_code integer, v_name varchar(35) not null, v_contact varchar(15) not null, v_areacode char(3) not null, v_phone char(8) not null, v_state char(2) not null, v_order char(1) not null, primary key (v_code)); create table product (p_code varchar(10) constraint product_p_code_pk primary key, p_descript varchar(35) not null, p_indate datetime not null, p_qoh integer not null, p_min integer not null, p_price numeric (8,2) not null, p_discount numeric (4,2) not null, v_code integer, constraint...
Consider the University Database with the following relations: Professors (pid, pname, dept, ext) Students (sid, sname,...
Consider the University Database with the following relations: Professors (pid, pname, dept, ext) Students (sid, sname, major-dept, year) Courses (cid, cname, dept, credithours) Enrollment (sem-year, sid, cid, grade) Teaches (pid, cid, sem-year, class-size) where, Professors: All professors have professor id (pid), name (pname), department that they work (dept), and a phone number extension for their office (ext). Students: All students have id (sid), name (sname), department for their major (major-dept), and a year (year i.e, freshman, sophomore, junior, etc). Courses:...
Consider the University Database with the following relations: Professors (pid, pname, dept, ext) Students (sid, sname,...
Consider the University Database with the following relations: Professors (pid, pname, dept, ext) Students (sid, sname, major-dept, year) Courses (cid, cname, dept, credithours)Enrollment (sem-year, sid, cid, grade) Teaches (pid, cid, sem-year, class-size), Professors: All professors have professor id (pid), name (pname), department that they work (dept), and a phone number extension for their office (ext). Students: All students have id (sid), name (sname), department for their major (major-dept), and a year (yeari.e, freshman, sophomore, junior, etc). Courses: All courses have...
Consider the University Database with the following relations: Professors (pid, pname, dept, ext) Students (sid, sname,...
Consider the University Database with the following relations: Professors (pid, pname, dept, ext) Students (sid, sname, major-dept, year) Courses (cid, cname, dept, credithours) Enrollment (sem-year, sid, cid, grade) Teaches (pid, cid, sem-year, class-size) where, Professors: All professors have professor id (pid), name (pname), department that they work (dept), and a phone number extension for their office (ext). Students: All students have id (sid), name (sname), department for their major (major-dept), and a year (year i.e, freshman, sophomore, junior, etc). Courses:...
Complete the following Table 2.1 for Lab 2.   Reference all the information that you include. The...
Complete the following Table 2.1 for Lab 2.   Reference all the information that you include. The Performance Standards for Antimicrobial Susceptibility Testing 27th ed. CLSI supplement M100 (by Clinical and Laboratory Standards Institute) is an excellent resource available online and also your Textbook. Table 2.1 The class, spectrum and mode of action of various antibiotics. Antibiotic Antibiotic class Spectrum of activity (gram +, -, or broad) Mode (mechanism) of Action Reference used Bacitracin Cyclic polypeptide Gram + Inhibition of cell...
Required information Use the following information for the Exercises below. [The following information applies to the...
Required information Use the following information for the Exercises below. [The following information applies to the questions displayed below.]    Hemming Co. reported the following current-year purchases and sales for its only product.      Date Activities Units Acquired at Cost Units Sold at Retail Jan. 1 Beginning inventory 280 units @ $13.20 = $ 3,696 Jan. 10 Sales 240 units @ $43.20 Mar. 14 Purchase 460 units @ $18.20 = 8,372 Mar. 15 Sales 410 units @ $43.20 July 30...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT