Databases | SQL | Oracle | MS Access Answers

Questions: 424

Free Answers by our Experts: 339

Ask Your question

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

We want to store the information of different vehicles. Create a class named Vehicle with two data member named mileage and price. Create its two subclasses
*Car with data members to store ownership cost, warranty (by years), seating capacity and fuel type (diesel or petrol).
*Bike with data members to store the number of cylinders, number of gears, cooling type (air, liquid or oil).

Write separate queries using a join, a subquery, a CTE, and then an EXISTS to list all AdventureWorks customers who have not placed an order.


 

Q1: Write the code in PHP MYSQL to update the salary of the employee where where name is ali and salary is an even number.                                                                                      (4)

CNIC

Name

Salary

Mobile Number


Consider relation EMPLOYEE. Suppose there are two applications that access EMPLOYEE. The

first is issued at four sites and attempts to find the Salary of employee by given their numbers.

Assume that we have set the simple predicates for application 1 are P1: Job-Title=

PRESIDENT,P2: Job-Title= MANAGER, P3: Job-Title= ANALYST The second application is

issued at two sites where the employee with a salary less than 15,00 USD are managed at one site,

whereas those with salary grater then 15, 00 USD are managed at a second site. Suppose we set

the simple predicates for site 2 are P4: Salary<15,00 USD, P5: Salary>=15,00 USD and P6:

Commission= 400.00 USD.

1. Perform a horizontal fragmentation of relation EMP with respect to the predicates above.

2. Explain why the resulting fragments of Employee does not fulfill the correctness rules of

fragmentation.


Consider relation EMPLOYEE. Suppose there are two applications that access EMPLOYEE. The first is issued at four sites and attempts to find the Salary of employee by given their numbers. Assume that we have set the simple predicates for application 1 are P1: Job-Title= PRESIDENT,P2: Job-Title= MANAGER, P3: Job-Title= ANALYST The second application is issued at two sites where the employee with a salary less than 15,00 USD are managed at one site, whereas those with salary grater then 15, 00 USD are managed at a second site. Suppose we set the simple predicates for site 2 are P4: Salary<15,00 USD, P5: Salary>=15,00 USD and P6: Commission= 400.00 USD. 1. Perform a horizontal fragmentation of relation EMP with respect to the predicates above. 2. Explain why the resulting fragments of Employee does not fulfill the correctness rules of fragmentation. 


Consider relation EMPLOYEE. Suppose there are two applications that access EMPLOYEE. The first is issued at four sites and attempts to find the Salary of employee by given their numbers. Assume that we have set the simple predicates for application 1 are P1: Job-Title= PRESIDENT,P2: Job-Title= MANAGER, P3: Job-Title= ANALYST The second application is issued at two sites where the employee with a salary less than 15,00 USD are managed at one site, whereas those with salary grater then 15, 00 USD are managed at a second site. Suppose we set the simple predicates for site 2 are P4: Salary<15,00 USD, P5: Salary>=15,00 USD and P6: Commission= 400.00 USD. 1. Perform a horizontal fragmentation of relation EMP with respect to the predicates above. 2. Explain why the resulting fragments of Employee does not fulfill the correctness rules of fragmentation. 


EMPLOYEE Commission Emp-ld 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 Emp-Name M. Junaid M. Usman M. Awais M. Jawad M. Ali M. Azhar M. Adeel M. Imran M. Nazer M. Asad M. Sadiq M. Kamarn M. Khuram M. Usama Job Title PRESIDENT MANAGER MANAGER MANAGER ANALYST ANALYST CLERK SALESMAN SALESMAN SALESMAN SALESMAN CLERK CLERK CLERK Hire-Date 1991-11-18 1991-05-01 1991-06-09 1991-04-02 1997-04-19 1991-12-03 1990-12-18 1991-02-20 1991-02-22 1991-09-28 1991-09-08 1997-05-23 1991-12-03 1992-01-23 Salary 6000.00 USD 2750.00 USD 2550.00 USD 2957.00 USD 3100.00 USD 3100.00 USD 900.00 USD 1700.00 USD 1350.00 USD 1350.00 USD 1600.00 USD 1200.00 USD 1050.00 USD 1400.00 USD 400.00 USD 600.00 USD 1500.00USD 0.00 USD Consider relation EMPLOYEE. Suppose there are two applications that access EMPLOYEE. The first is issued at four sites and attempts to find the Salary of employee by given their numbers. Assume that we have set the simple predica


Differentiate Homogenous Databases with Heterogenous databases with the help of a case study.


Get all the potential users. Fetch the user_ids who liked at least 2 videos published by "Disney" channel, and who did not subscribe to the channel (channel_id = 352).

Note:

  • Consider reaction_type LIKE as liked.
  • Sort the output in the descending order of no_of_likes, and then in the ascending order of potential_user_id.

Expected Output Format


potential_user_idno_of_likes

sir plz explain the sql query


Get all the user_ids who liked at least 5 videos published by "Tedx" channel.

Note:

  • Consider reaction_type LIKE as liked.
  • Sort the output in the descending order of no_of_likes, and then in the ascending order of active_user_id.

Expected Output Format


active_user_idno_of_likes

sir plz explain the sql query


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS