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
maxonik [38]
3 years ago
9

Consider the relational schema below: Students(sid: integer, sname: string, major: string) Courses(cid: integer, cname: string,

hours: integer) Enrollment(sid: integer, cid: integer, grade: real) Write a relational algebra expression that satisfies this query? Find the distinct names of all students that take at least three courses and major in "Philosophy".
Computers and Technology
1 answer:
daser333 [38]3 years ago
7 0

Solution :

Here, we need to perform JOIN operation of the students and registration.

Use NATURAL JOIN operator \Join and so no need to specify Join condition.

Also we need to selection operator tp select only those course whose major in "philosophy".

Finally we projection operator π to project only distinct students name who took at least three courses.

$\pi [\sigma_{\text{student's nam}e} [ \sigma(\text{three courses}) \Join \text{"Philosophy"}]]$

You might be interested in
What is requirement analysis
MaRussiya [10]
Requirements analysis<span>, also called </span>requirements<span> engineering, is the process of determining user expectations for a new or modified product. These features, called</span>requirements<span>, must be quantifiable, relevant and detailed. In software engineering, such </span>requirements<span> are often called functional specifications. i hope this helps

</span>
5 0
3 years ago
Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither.
Volgvan

Question:

Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither. The input begins with an integer indicating the number of integers that follow. Assume that the list will always contain less than 20 integers.

Answer:

Written in Python

listlent = int(input("Length of List: "))

mylist = []

mylist.append(listlent)

for i in range(listlent):

    num = int(input(": "))

    mylist.append(num)

<em>    </em>

evens = 0

odds = 0

for i in range(1,listlent+1):

    if mylist[i]%2==0:

         evens=evens+1

    else:

         odds=odds+1

       

if(evens == 0 and odds != 0):

    print("All Odds")

elif(evens != 0 and odds == 0):

    print("All Even")

else:

    print("Neither")

Explanation:

This prompts user for length of the list

listlent = int(input("Length of List: "))

This initializes an empty list

mylist = []

The following iteration reads the list items from the user

<em>mylist.append(listlent)</em>

<em>for i in range(listlent):</em>

<em>     num = int(input(": "))</em>

<em>     mylist.append(num)</em>

   

The next two lines initialize even and odd to 0, respectively

<em>evens = 0</em>

<em>odds = 0</em>

<em />

The following iteration if a list item is even or odd

<em>for i in range(1,listlent+1):</em>

<em>     if mylist[i]%2==0:</em>

<em>          evens=evens+1</em>

<em>     else:</em>

<em>          odds=odds+1</em>

This checks and prints if all list items is odd        

<em>if(evens == 0 and odds != 0):</em>

<em>     print("All Odds")</em>

This checks and prints if all list items is even        

<em>elif(evens != 0 and odds == 0):</em>

<em>     print("All Even")</em>

This checks and prints if all list items is neither even nor odd

<em>else:</em>

<em>     print("Neither")</em>

4 0
2 years ago
a. Do you think the U.S. government should censor information on the Web, such as instructions for making weapons, to protect th
MrRissso [65]

Answer:

The answer is YES.

Explanation:

<em>Things pertaining to weapons, destructive materials should be shared with precautions or much better if these things should not be put online. Since internet is widely available to almost all types of users and almost to all places, we cannot be sure of who will get hold of these information. Kids could easily see this and gain knowledge and out of curiosity will try these dangerous things. Terrorist groups will also have access to these information and who knows might happen to poor innocent souls around.  </em>

<em> </em>

<em>I don't think it would violate the right of First Amendment regarding freedom of speech. Freedom should be granted on matters that are most sensible. And this time, we are just protecting the rights of children and other innocent people who can be a victim including you. We are talking about weapons and destructive materials here which is non beneficial if one could get hold of this information, in my opinion. If there is really a need to construct these things, it is better to consult an expert or an authority to ensure that nobody gets harm.</em>  

5 0
2 years ago
With the range E2:E30 selected, create a new conditional formatting rule that uses a formula to apply yellow fill and bold font
Nana76 [90]

Answer:

Attached are the excel screenshots

3 0
3 years ago
How can i become an ailen?
DIA [1.3K]
Go to a different state as a migrant and then your a alien
8 0
3 years ago
Read 2 more answers
Other questions:
  • True or false? It is just too challenging to have different password for every
    12·1 answer
  • (I made this up teehee) what anime is katski bakugo from
    15·2 answers
  • FIGURE A-2—Use the information in this chart to answer Question 2.
    11·1 answer
  • What is the full form of icimod?
    6·1 answer
  • What type of engineer is interested in designing, developing, and building different machines, devices, and tools? A.aerospace
    8·2 answers
  • The pay of an hourly worker is calculated by multiplying the hours worked by the hourly rate—up to 40 hours; any hours worked be
    11·1 answer
  • This is the term for the manual process of editing strips of the film before digital editing was created. The term is still used
    9·1 answer
  • Which of the following is true of binary files?
    6·2 answers
  • A location in memory which stores a value, the value can change as the program is running is
    12·1 answer
  • Write a program that asks the user for the name of a text file. The program should display the first 10 lines of the file on the
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!