Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8867433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:01:41+00:00 2026-06-14T17:01:41+00:00

I have a databases test tomorrow and am hoping someone can confirm this answer

  • 0

I have a databases test tomorrow and am hoping someone can confirm this answer for me. Say I have a schema of this:

branch (branch_name, branch_city, assets)
customer (customer_name, customer_street, customer_city)
account (account_number, branch_name, balance)
loan (loan_number, branch_name, amount)
depositor (customer_name, account_number)
borrower (customer_name, loan_number)

The question I am curious about is:
“Find the names of all customers who have a loan of more than £5000 but no account with a balance of more than £500.”

Original code:

π customer_name
  (σ amount > 5,000 ^ balance < 500 
    (borrower ⋈ loan ⋈ depositor ⋈ account))

Edit: Having looked at Erwin Smout’s advice, I’ve amended my code to the following:

π customer_name
  (σ amount > 5,000 (borrower ⋈ loan))
-
π customer_name
  (σ balance < 500 (depositor ⋈ account))   

Is that correct?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:01:42+00:00Added an answer on June 14, 2026 at 5:01 pm

    I’ll just answer my own question as I now know it is correct. Thanks to everyone who helped:

    π customer_name (σ amount > 5,000 (borrower ⋈ loan))    
    -
    π customer_name (σ balance < 500 (depositor ⋈ account))   
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two databases. My source looks like this: FirstTable ------ TestingData ----------- Test
I have following databases: test table1 fields: id, password, name, lastname test2 table2 fields:
I have a few test databases in some Unix SUSE 8 servers and initially
Let's say I have two database instances: InstanceA - Production server InstanceB - Test
For our test fixtures we use NHibernate to generate a database schema. We have
In Mongo my understanding is that you can have databases and collections. I'm working
We want to have our test servers databases updated from our production server databases
I have 2 databases. One, named Test, has a table named Vehicles. Another, named
I have been trying to create the development and test databases in Redmine, with
I have two databases, one is in a test environment and is sqllite3 and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.