Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In database MySQL solve the following ( 1-8) questions ((I upload two pictures)) SQL Queries: Using the University database, write following queries: 1. Student Table

In database MySQL solve the following ( 1-8) questions ((I upload two pictures))

image text in transcribed

image text in transcribed

SQL Queries: Using the University database, write following queries: 1. Student Table : IL name Instr_id 2000 IFname Wafa gender F Ahmed 2001 Hind Fahed F 2002 Asma Abdullah F 2003 Ali Fahed M NULL NULL NULL NULL 2. Instructor Table: SFName BDate Gender Std_ID 1000 SL Name Ahmed Ali Address Dammam Alkhobar M Norah F 1001 1002 Ahmed Abdullah Kamal Salem Dammam M Nada F 1003 1004 1005 1988-03-08 1990-09-08 1990-08-03 1991-09-06 1991-05-06 1989-05-03 1989-05-02 NULL Ali F Riyadh Riyadh Dammam Alkhobar Norah Nouf Nasser F 1006 NULL Rana NULL Abdullah NULL F NULL NULL 3. Course Table : Course_Id 3000 Course_Name credit_hours Database Mana... 3 Business 2 Inst_id 2000 3001 2001 3002 IT Proect 3 2002 2003 3003 3004 Project Proposa... 2 Technical Repo... 3 Data Mining 3 2002 3005 2003 4. Enrolled Table : Year Could 3000 Stude_ld 1000 2013 1001 2012 3001 3001 1006 2010 3002 1002 2013 3003 1002 2013 3003 1003 2012 3004 1000 2012 3004 1005 2010 3005 1004 2011 ver- - University Database Diagram: Student 8 Std_ID SFName Instructor Instr_id IFname Ilname gender SLName Address BDate TI enrolled 8 Could Stude_ld Year O Course 8 Course_Id Course_Name credit hours Inst_id 1. View all students information only if there is a student who's address is not Jeddah? Address Gender Std_ID SFName 1000 Ali SLName Ahmed 1 Dammam M 2 Norah Abdullah BDate 1988-03-08 1990-09-08 1990-08-03 1991-09-06 1001 1002 F 3 Kamal M 4 1003 Ahmed Nada Norah Salem F Alkhobar Dammam Riyadh Riyadh Dammam Alkhobar 5 1004 Ali 1991-05-06 F 6 1005 Nouf Nasser 1989-05-03 F 7 1006 Rana Abdullah 1989-05-02 F 2. Get student Id for all students who's registered more than one course ? Stude_id 1000 1 2 1002 3. View Instructors that their First name starts with A and last name ends with d ? IFname ILname Fahed 1 Ali 4. Get Instructors first & last names ordered by their last name Ascending and then their first name Descending ? IFname Asma Ilname Abdullah 1 2 Wafa Ahmed Hind 3 4 Fahed Fahed Ali 5. View all course numbers who either the instructor id =2001 was teaching the course or the course who taught in year 2013 in ascending order of course number? Course_Id 1 3000 2 3001 3 3002 4 3003 6. View all course numbers who the instructor id=2002 was teaching the course and taught in year 2012 in ascending order of course number? Course_id 3004 7. View all course id and instructor id their course id are 3000 or 3001. And view the minimum credit hours for each course. 8. Update the address= 'Jeddah' for all student

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

More Books

Students also viewed these Databases questions

Question

3.What are the Importance / Role of Bank in Business?

Answered: 1 week ago

Question

4. Help trainees set challenging mastery or learning goals.

Answered: 1 week ago

Question

2. Enrolling employees in courses and programs.

Answered: 1 week ago