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

Write PL/SQL block to create a trigger to update the records according to working days that is you can not update record in holidays


Write a PL/SQL program to check whether a date falls on weekend i.e. SATURDAY or SUNDAY input give input as 5sep 1984

Polly Pipe is a water sports provider and installer based in Braintree, England. They need you to design and implement a database that meets the data requirements. These necessities are defined in this scenario and below are samples of the paper records that the Polly Pipe preserves.

Customers can request several installations, but each installation is tailor-made for a specific customer.The facilities use equipment such as aquariums, air pumps and thermostats.

1.1.Identify the user and system requirements to design a database for the above scenario and design a relational database system using conceptual design (ER Model) by including identifiers (primary Key) of entities and cardinalities, participations of relationships. Convert the ER Model into logical database design using relational database model including primary keys foreign keys and referential Integrities.


Consider the following table “Students”:


stu_id class Rep Study_Group Gender

001 12 Muhammad Ali Science Male

002 11 Arham Arts Male

003 12 Maham Science Female

004 12 Maira Arts Female

005 11 Abdullah Science Male


And perform the following tasks:

⦁ Write a Hive query that changes the column name “Rep” and set it as “Student Name”.

⦁ Write a Hive query that only shows the record of female students.

⦁ Write a Hive query that changes the name of the “Students” table and sets its name as “Students_Record”.



Consider the following MYSQL table named “Students”. 

stu_id class Rep Study_Group Gender

001 12 Muhammad Ali Science Male

002 11 Arham Arts Male

003 12 Maham Science Female

004 12 Maira Arts Female

005 11 Abdullah Science Male



  • Write a HiveQL statement (query) that will create a database named “CS441” and a table in Hive named as “Students” having the same fields as mentioned in the “Students” table. Fields should be terminated by ‘\t’ and lines (rows) should be terminated by ‘\n’. 

1. Use SQL commands to perform following operations: a. Display a list of available databases b. Create the database (choose any appropriate name in the format c. Select your database d. Create a table: i. Create a relation with the name DEPARTMENT ii. It has four attributes namely Dept_id, Dept_name, Building, and Budget iii. Dept_id is an integer, Dept_name is a character string of maximum length 20, Building is a character string of maximum length 15, and Budget is a number with 12 digits in total, 2 of which are after the decimal point iv. The create table command should also specify Dept_name attribute as not null and set a default value for Building to ‘A’ e. Drop the table DEPARTMENT f. Add attribute Phone to DEPARTMENT relation using Alter command g. Drop attribute Budget from a relation DEPARTMENT by using Alter command h. Modify datatype of Dept_id to varchar(25) using Alter command 2. Put all your output screenshots along with SQL commands in a single PDF file and upload in Moodle


Ques- create a SQL query .....on






Table : STUDENT








Admno 101 , 102 , 103 , 104 & 105








Name






Ayushi






heena






Jitender






meena








Marks






52, 95 , 89 , 65 ,98








1) Write a create table query






2) To displey al details of all students.






3) To dsplay al details in descending order of marks.






4) To display admno and name of all students whose name starts with 'A.






4 To display the maximum and minimum marks from the table students






5) To dsplay al details of students whose marks are between 80 to 95 inclusive

Ques- create a SQL query .....on


Table : STUDENT



Admno 101 , 102 , 103 , 104 & 105



Name


Ayushi


heena


Jitender


meena



Marks


52, 95 , 89 , 65 ,98



1) Write a create table query


2) To displey al details of all students.


3) To dsplay al details in descending order of marks.


4) To display admno and name of all students whose name starts with 'A.


4 To display the maximum and minimum marks from the table students


5) To dsplay al details of students whose marks are between 80 to 95 inclusive

Posted about 6 hours ago


Ques- create a SQL query .....on


Table : STUDENT



Admno 101 , 102 , 103 , 104 & 105



Name


Ayushi


heena


Jitender


meena



Marks


52, 95 , 89 , 65 ,98



1) Write a create table query


2) To displey al details of all students.


3) To dsplay al details in descending order of marks.


4) To display admno and name of all students whose name starts with 'A.


4 To display the maximum and minimum marks from the table students


5) To dsplay al details of students whose marks are between 80 to 95 inclusive

Ques- create a SQL query .....on


Table : STUDENT



Admno 101 , 102 , 103 , 104 & 105



Name


Ayushi


heena


Jitender


meena



Marks


52, 95 , 89 , 65 ,98



1) Write a create table query


2) To displey al details of all students.


3) To dsplay al details in descending order of marks.


4) To display admno and name of all students whose name starts with 'A.


4 To display the maximum and minimum marks from the table students


5) To display al details of students whose marks are between 80 to 95 inclusive

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS