Computers and Technology

Consider a social network database about people and their relationships. The database has two relations: Person ( pid, name ) Relationship ( pid1, rel, pid2 ) The key fields are underlined: Person. pid is the key for Person, and Relationship. pid1 and Relationship. pid2 are foreign keys to Person. rel is a string representing the relationship type, and it can only be ’friend’ or ’enemy’. So, a tuple (1,’friend’,2), means that the person with id 1 considers the person with id 2 a friend. Note that the relationship is not symmetric: if Alice is friend with Bob, it does not imply that Bob is friend with Alice. Required:
Create a view called mutual that contains pairs of people who share mutual feelings for each other (i. e., they consider each other friends or enemies). The schema of your view should be mutual(name1,name2).

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 18:00, rajenkins79
What is stored in str after the following code executes? string str = "computer science"; int i = 0; while (i < 8) { if (str. indexof("m") < i) { str = str. substring(0, 2) + str; } i += 2; } computer science cocomputer science cococomputer science cocococomputer science computer scienceco
Answers: 3
image
Computers and Technology, 22.06.2019 00:30, angeline2004
At an open or uncontrolled intersection, yield if a. the cross road has more lanes than yours b. the cross road has fewer land than yours c. you’re on a state highway and the cross road is a secondary road d. do you have three or more passengers in your vehicle
Answers: 2
image
Computers and Technology, 22.06.2019 17:40, math31343
Gabe wants to move text from one document to another document. he should copy the text, paste the text, and open the new document highlight the text, select the cut command, move to the new document, make sure the cursor is in the correct location, and select the paste command select the save as command, navigate to the new document, and click save highlight the text, open the new document, and press ctrl and v
Answers: 1
image
Computers and Technology, 22.06.2019 19:10, kaiya789
10. when you create a pivottable, you need to specify where to find the data for the pivottable. is it true
Answers: 2
Do you know the correct answer?
Consider a social network database about people and their relationships. The database has two relati...

Questions in other subjects: