1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Galina-37 [17]
3 years ago
7

Consider the following relational schema, where the primary keys are Bold,

Computers and Technology
1 answer:
sp2606 [1]3 years ago
5 0

Answer:

The queries for each question are explained.

1. Find the sids and snames of students who took "Database" course (i.e., cname = ‘Database’) in Fall 2019.

 The columns sid and sname are taken from students table.

The course name belong to the courses table.

The semester and year belong to the grades table.

To get the final query, all these tables need to be joined in the FROM clause using JOIN ON keywords.

select s.sid, sname

from students s join grades g on g.sid = s.sid

join courses c on g.cid = c.cid

where cname like 'database%'

and semester like 'Fall'

and year=2019

2. Find the average grade of all the students who took "CS327" (i.e., cid=‘CS327’) in Fall 2019. You can assume grade is a numerical attribute.

The grade column is taken from grades table.

The course id belongs to the grades table.

The semester and year also belong to the grades table.

The final query is formed using the grades table only.

 select avg(grade)

from grades

where cid like 'CS327'

and semester like 'Fall'

and year=2019

 3. Find the number of distinct courses offered by each department in Fall 2019.

 The department id belongs to the courses table.

The course id belongs to the grades table.

The semester and year also belong to the grades table.

To get the final query, the courses and the grades tables are joined in the FROM clause using JOIN ON keywords.

select dept_id, count(distinct g.cid)

from courses c join grades g on c.cid = g.cid

where semester like 'Fall'

and year=2019

group by dept_id

You might be interested in
How can goal setting help with academic performance?
rosijanka [135]
Im pretty sure the answer is b.
8 0
3 years ago
QUESTION: Which is not an example of a video port or cable?
Vikki [24]

Answer:

Radio Corporation of America (RCA)

Explanation:

A corporation is not a video connector.

8 0
3 years ago
The ____ allows 127 different devices to connect to a computer via a single usb port on the computer’s system unit
hram777 [196]
<span>I'm 100% sure that correct answer should look like this: The USB standart port allows 127 different devices to connect to a computer via a single usb port on the computer’s system unit.</span>
4 0
3 years ago
Why is the binary number system used in digital logic?
Slav-nsk [51]
<span>Binary number system used in digital logic because of the simplest nature of its representation.</span>
8 0
3 years ago
You want to decide whether you should drive your car to work or take the train. You know the one-way distance from your home to
tester [92]

<u>Explanation:</u>

Remember, an algorithm in simple words means a set of instructions or steps to be followed in other to solve a problem.

Note, to decide which commute is cheaper, it means the output of the algorithm should be the cheaper way to commute.

Using pseudocode do the following;

  • determine the inputs and outputs of the problem
  • arrange the identified problem into micro-tasks
  • describe each micro-tasks in the pseudocode
  • Test the pseudocode by solving the problem.

                       

3 0
3 years ago
Other questions:
  • he wide range of materials used to create the Buk (mask) of the Torres Strait has been interpreted as evidence of the islanders'
    5·1 answer
  • One problem with using e-mail is that ______. a. It can be perceived as being too casual b. It is never appropriate for business
    12·1 answer
  • What part of the communication feedback loop results in unclear communication?
    13·1 answer
  • Every computer consists of physical components and nonphysical components. the nonphysical components of a computer that underst
    9·1 answer
  • A copy machine is available 24 hours a day. On a typical day, the machine produces 100 jobs. Each job takes about 3 minutes on t
    8·1 answer
  • In what way can an employee demonstrate commitment?
    15·2 answers
  • Please help.........​
    13·1 answer
  • On a wireless network use _____ to ensure that only authorized client computers are able to access the wireless network.
    10·1 answer
  • A regional bank implemented an automated solution to streamline their operations for receiving and processing checks/cheques. th
    9·1 answer
  • Daily IT Question
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!