Skip to content
Advertisement

Tag: relational-database

Subset of a candidate key

As we know a candidate key is a column or combination of columns that uniquely identifies the rows in a relation. Suppose I have a relation in which candidate keys are combinations of columns. I want to ask, is it possible that a subset of a candidate key also uniquely identifies the row? OR is a candidate key a key

Complicated MySQL Select query

Here is my table layout: What I would like to do: Count the number of votes for each songID in a particular room (passed in as a parameter). Find out if the userID has at least one vote for a song in a particular room. UserID is also passed in as a parameter. An extension of the two above. If

How to create relationships in MySQL

In class, we are all ‘studying’ databases, and everyone is using Access. Bored with this, I am trying to do what the rest of the class is doing, but with raw SQL commands with MySQL instead of using Access. I have managed to create databases and tables, but now how do I make a relationship between two tables? If I

Advertisement