Databases | SQL | Oracle | MS Access Answers

Questions: 901

Answers by our Experts: 732

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Using inheritance, one class can acquire the properties of others. Consider the  following Animal class: 

class Animal{ 

 void walk(){ 

 System.out.println("I am walking"); 

 } 

This class has only one method, walk. Next, we want to create a Bird class that also  has a fly method. We do this using extends keyword: 

class Bird extends Animal { 

 void fly() { 

 System.out.println("I am flying"); 

 } 

Finally, we can create a Bird object that can both fly and walk

public class Solution{ 

 public static void main(String[] args){ 


 Bird bird = new Bird(); 

 bird.walk(); 

 bird.fly(); 

 } 

The above code will print: 

I am walking 

I am flying 

This means that a Bird object has all the properties that an Animal object has, as well  as some additional unique properties. 

The code above is provided for you in your editor. You must add a sing method to  the Bird class, then modify the main method accordingly so that the code prints the  following lines: 

I am walking 

I am flying

I am singing


ACME Green is a huge, strategic project across all the companies in the ACME Technologies group.



Tshepo knows that technology will not be the only aspect he will need to manage well for the



project to be successful – he also needs the right people.



List five types of users that would be using the operational carbon accounting database and



explain what the responsibility of each type of user will be in ACME Technologies.

3. Create a query to display Student name with Old Gpa and New Gpa increased by 30 Percent. Rename column heading accordingly.


4.Display the query for all the student whose GPA increased by 15% and Old GPA. Show the difference between Old and New GPA. Observe the following output.


Create a PL/SQL block that determines the total number of bookings made by the specific guest. The block must prompt the user to enter a staff number to retrieve and display this guest information as detailed in the output. Any guest with no cell number uses this number “012 5680-000”.



SQL> /


Enter value for guest_number: 1001 The Guest : MALHERBE(4510074554897) from Germiston who made total number of 4 bookings can be contacted on 071 3562-332


PL/SQL procedure successfully completed.


SQL> /


Enter value for guest_number: 1002 The Guest : NKOSI(7502210056087) from eMALAHLENI who made total number of 7 bookings can be contacted on 012 5680-000


PL/SQL procedure successfully completed.


SQL> /


Enter value for guest_number: 1003 The Guest : MAKHWATSHWA(9110236744589) from Mbombela who made total number of 2 bookings can be contacted on 084 5678-998


PL/SQL procedure successfully completed.

Create a PL/SQL block that will prompt the user to enter a staff number .Your block then has to retrieve and display the surname, telephone number, appointment date, and monthly salary and set up a new password for this staff member. Derive this new password by joining the current password with the last 4 numbers of the staff’s telephone number. Make use of the correct padding function to include the stars in the password.






Enter value for employee_number: 1 Employee DLAMINI ZUMA Date employed 1st of January 2014 Monthly Salary $12,000.00 New Password DZTP#001**4554





PL/SQL procedure successfully completed.






SQL> /






Enter value for employee_number: 2 Employee MAHLANGU Date employed 1st of January 2014 Monthly Salary $10,000.00 New Password MJ#002**4532





PL/SQL procedure successfully completed.

Display the students name, those who have failed in their last semester, by applying select, project, rename, union, intersection and cross product operation.

1)proof the following  rule by using university database
 sigma <condition1>(sigma < condition2>
(R)) = sigma
<condition2>
(sigma < condition1>
(R)) .
2)proof the following  rule by using university database
sigma <cond1>(sigma < cond2>
(sigma <cond3>(R))
= sigma <cond1>
AND < cond2> AND < cond3>(R)))

1)proof the following rule by using university database

 sigma <condition1>(sigma < condition2>

(R)) = sigma

<condition2>

(sigma < condition1>

(R)) .

2)proof the following rule by using university database

sigma <cond1>(sigma < cond2>

(sigma <cond3>(R))

= sigma <cond1>

AND < cond2> AND < cond3>(R)))

The Project director creates a project and a “project profile” for each project. The creation of the project profile includes identification of project employee costs, the assignment of tasks to the project, and the assignment of a project manager. The project profile is consisted of project id, project personnel cost, a list of tasks assigned, and the project manager. The Project director also creates the teams for a given project, assigns employees to the teams, and assigns a team leader. The Project manager is responsible for assigning tasks to various teams working on the projects(s). The Team Leader assigns tasks to the team members.


What is the ER diagram and flow chart for the above scenario?


Q. Find topper of the each branch for both subjects individually and print:


1. Name of the faculty who taught that subject.


2. Name of the branch


3. Subject Name


4. Marks


5. Name of student



Q. Print name of the teacher who taught to most number of students for both subjects individually.


(Example Tejas G. taught maths to 2 students in following example database)



Q. Find branch wise average marks scored by students for both subjects.




LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS