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 7713865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:58:47+00:00 2026-06-01T01:58:47+00:00

Is it possible to define a constraint like this: A <- SELECT Enrolment course

  • 0

Is it possible to define a constraint like this:

A <- SELECT Enrolment course = x AND student = y
B <- PROJECT A OVER student
COUNT(B) < 3

I’m particularly interested in the “AND” part. I know from my books that the rest is OK.

The syntax is based on Codd [1] and does not apply to any particular DBMS.

Sources:

  1. http://en.wikipedia.org/wiki/Relational_algebra
  • 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-01T01:58:48+00:00Added an answer on June 1, 2026 at 1:58 am

    With a constraint, no, not in general. That’s a little complex for a constraint.

    If you want something like that, you usually have to resort to triggers, which can usually run arbitrarily complex code. A before-insert and before-update trigger, assuming your DBMS has them, should do the trick.

    Please note that triggers almost certainly have a performance impact and they should only be used where necessary but they should be used if the data has to follow rules, don’t let anyone tell you differently).

    The general rule is: if the constraint is a property of your data, it should be done by the DBMS itself (with constraints or triggers or whatever vendor-specific things you may have available to you).

    However, if the constraint is a property of the application, it should be handled by the application without any effort by the DBMS.

    In reality, I don’t think I’ve ever seen that latter situation arise since the application and data tend to be bound pretty tightly, but I’ve never seen little green men either and they may well exist 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to define a spring-managed EJB3 hibernate listener? I have this definition
It'd be nice if I could define a method like this: public T GetItem<T>()
I doubt this is possible but what I would like to do is have
I'd like to know if it is possible to define an enum with an
For instance, is the following possible: #define definer(x) #define #x?
Possible Duplicate: Is it possible to define enumalpha? Is there any equivalent of Java
Is it possible to define a timestamp column in a MySQL table that will
Is it possible to define a class in C# such that class GenericCollection<T> :
In VBP its possible to define user defined actions by creating a custom COM
Is it possible to define anonymous subroutines in a hash constructor in Perl? I'm

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.