1

To write this in relational algebra how do I specify the DISTINCT keyword?

SELECT DISTINCT FacultyName from Faculty;
philipxy
  • 14,867
  • 6
  • 39
  • 83
  • This is a faq. Before considering posting please always google your error message or many clear, concise & precise phrasings of your question/problem/goal, with & without your particular strings/names & site:stackoverflow.com & tags, & read many answers. If you post a question, use one phrasing as title. See [ask] & the voting arrow mouseover texts. PS There are many RAs (relational algebras). They differ in operators & even what a relation is. Give a reference and/or definition for yours. Eg textbook name, edition & page. PS But normally a relation is a set--no duplicates. – philipxy Oct 07 '19 at 13:27

1 Answers1

1

In a relational model, relationships are sets of tuples that, by definition, do not contain "duplicate" records.

Iskuskov Alexander
  • 4,077
  • 3
  • 23
  • 38
  • They aren't "eliminated", they aren't produced. They might be produced or eliminated by some non-relation operators that you decide to use in some description of what the realtion operators return. – philipxy Oct 07 '19 at 13:26
  • You're right. More precisely, I mean that in a relational model, relationships are sets of tuples that, by definition, do not contain “duplicate” records. – Iskuskov Alexander Oct 07 '19 at 13:43
  • Please clarify via edits, not comments. – philipxy Oct 08 '19 at 00:57