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
To insert text from a separate file into your Word document
vagabundo [1.1K]
Copy and paste? i think.
3 0
3 years ago
My tv is hdtv but it does not show the name of the channels
prohojiy [21]
It might have checked you in wrong or you guys set it up wrong.
8 0
3 years ago
Ingrid started speaking about her slide presentation. When she clicked to th
german

Answer: B add presenters notes

8 0
3 years ago
Read 2 more answers
One form of Intrusion Detection System (IDS) starts operation by generating an alert for every action. Over time, the administra
soldier1979 [14.2K]

Answer:

advantages

- detect anomalies

- information for new security rules

disadvantages

- false alarms

Explanation:

Advantages

- With an IDS we can check and track every attack or detect anomalies even when you don't know about these behaviors.

- When an IDS detects anomalies, the system generates information about these behaviors and you can create new rules for these attacks.

Disadvantages

- When we use an IDS, we could receive false alarms because we cannot predict every behavior.

4 0
4 years ago
Assume that programs spend about 25% of their time waiting for I/O operations to complete. If there are FOUR programs loaded int
natima [27]

Answer:

0.9961

Explanation:

Given that:

Proportion of time waiting for I/O operation to complete = 25% = 0.25

Number of programs waiting in memory = 4

Using the CPU Utilization formula :

CPU Utilization = 1 - p^n

1 - 0.25^4

1 - 0.00390625

0.99609375

5 0
3 years ago
Other questions:
  • write an algorithm that gets the price for item A plus the quantity purchased. The algorithm prints the total cost, including a
    5·1 answer
  • Windows domain policy to disable windows 10 update
    7·1 answer
  • Where is help on this system?
    7·2 answers
  • Suppose we are given an arbitrary digraph G = (V, E) that may or may not be a DAG. Modify the topological ordering algorithm so
    8·1 answer
  • The enhanced for statement allows you to iterate through the elements of an array or a collection without using a counter. Give
    10·2 answers
  • Page Up and Page Down keys fall under the ? keys category.
    14·2 answers
  • What are two major techniques involved in green computing
    10·1 answer
  • The difference between a checked and an unchecked exception is:
    10·1 answer
  • What is the number system that uses only the numbers 0 and 1?
    8·1 answer
  • Write short cut of<br> fully justified​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!