1.If we apply the cross-product operation to these two instances of STUDENTS & BOOKS, what would be the resulting relation?
STUDENTS
Student_ID Student_Name Qualification
401 Andile HCIT
402 Carol DIT
403 Amber BSc
404 Bright HCIT
BOOKS
Book_ID Title Copy-right
101 Database fundamentals 2017
102 C++ how to program 2018
103 Simply Visual Basic 2019
104 OOP for beginners 2020
1.1 SELECT and RETURN all students with qualification HCIT from relations STUDENTS X BOOKS
1.2 Write a relational algebra expression using the symbolic notation for the given question in (1.1) above.
1.1 SELECT * FROM STUDENTS s
CROSS JOIN BOOKS b
WHERE Qualification LIKE 'HCIT'
RETURN:
Student_ID Student_Name Qualification Book_ID Title Copy-right
401 Andile HCIT 101 Database fundamentals 2017
401 Andile HCIT 102 C++ how to program 2018
401 Andile HCIT 103 Simply Visual Basic 2019
401 Andile HCIT 104 OOP for beginners 2020
404 Bright HCIT 101 Database fundamentals 2017
404 Bright HCIT 102 C++ how to program 2018
404 Bright HCIT 103 Simply Visual Basic 2019
404 Bright HCIT 104 OOP for beginners 2020
1.2 "\\sigma" qual = 'HCIT'(STUDENTS * BOOKS)
Comments
Leave a comment