Share Your Experience: Take the 2024 Developer Survey

# Tag Info

### A tuple relational calculus equivalent for the given SQL query

A tuple relational calculus expression should be written with the usual language of first order logic. In this case, for instance, you could write: { [e.Name, d.Name] | Ǝ e ∈ Employee, Ǝ d ∈ ...
• 4,080

### Converting SQL to Relational Algebra / Calculus

You have a number of "mistakes" in your SQL, that should be addressed before you translate it to relational algebra. You don't have a FROM in your SQL. You shouldn't start by JOINing. You seem to ...
• 13.5k
Accepted

### Confusion with Tuple Relation Calculus Operations

∃s (student(s) ∧ s.sex = ‘F’ ∧ s.deptNo = d.deptId) For some s, s is a student & s is female & s is in d's department. ~∃s (student(s) ∧ s.sex = ‘F’ ∧ s.deptNo = d.deptId) For no s, s is a ...
• 778
1 vote

### How can I calculate the cost of the query, if there is a `between` condition?

If there is no index for A.id column, then database engine perform full table scan. So O(N) operations are performed. If there is a B+tree index for A.id then database optimizer may choose it, if ...
1 vote
Accepted

### Declarative and Procedural Query Languages

The writing is poor. "Declarative" is informal & they use it it in two ways. The general meaning is, "describe a result (not a process)". But many descriptions of results have an obvious ...
• 778
1 vote

### Questions Concerning the Chase Test

CONFIRMED FROM MY PROF THAT THESE ANSWERS ARE RIGHT Let's start by creating a tableau for each relation, then joining them together, and running the chase test afterwards. **T₁(R₁(A,B,C,......,)) = ...
1 vote

### How to express functional dependency in relational calculus and SQL?

Not knowing your full situation, I recommend something like this. The foreign keys should create the dependencies you need. If your SQL structure is already in a tabular format, you might consider ...
• 2,788
1 vote

### Creating relationships between tables that where not specified in the given UML diagram

In addition to Ziggy answer, if you want to make this diagram work, you need to edit it, for example you should create a third table called cleint_order and this table has primary key from Client ...
• 2,686
1 vote
Accepted

### Creating relationships between tables that where not specified in the given UML diagram

UML class diagrams do not include relations in a class' attributes list, so when creating database tables representing those classes, the database designer must identify and specify them, much like ...
• 5,018

Only top scored, non community-wiki answers of a minimum length are eligible