constraints
Constraint to check if a column is null or references other column?
Is it possible (in PostgreSQL) to make a constraint that says that a column must be null or contain a value from another column, in another table? In other words, to combine a CHECK constraint with a[详细]
2023-03-23 19:55 分类:问答How to get the name of a unique constraint in postgresql?
I need to drop a unique constraint from a pos开发者_开发问答tgresql table, but I didn\'t give it a name in the schema. Does anybody know, how to get the name of such a constraint, or how to drop it?Th[详细]
2023-03-23 00:41 分类:问答This algorithm does not have a quadratic run time right?
I recently had an interview and was given a small problem that I was to code up. The problem was basically find duplicates in an array of length n, using constant space in O(n). Each element is in th[详细]
2023-03-22 13:36 分类:问答how to implement data constraints to enforce minimum number child objects?
Suppose each AssetGroup object must have at least 1 Asset object . How to enforce this constraint in :[详细]
2023-03-22 09:29 分类:问答Postgres: Add constraint if it doesn't already exist
Does Postgres have a开发者_如何转开发ny way to say ALTER TABLE foo ADD CONSTRAINT bar ... which will just ignore the command if the constraint already exists, so that it doesn\'t raise an error?A poss[详细]
2023-03-22 05:49 分类:问答MySQL INSERT IGNORE without TimeStamp
Good evening, I have one table, with a timestamp column, then I have a tool to insert into this table N registries. To avoid duplicate information in this 开发者_运维知识库table, I\'ve used INSERT IGN[详细]
2023-03-21 12:43 分类:问答How to use Solver Foundation to simplify a decision matrix
Have been struggling a while, seek for some suggestion here hopefully. First the decision matrix is something like this:[详细]
2023-03-21 01:12 分类:问答Type parameter 'T' has the same name as the type parameter from outer type '...'
public abstract class EntityBase { ... } public interface IFoobar { void Foo<T>(int x) where T : EntityBase, new();[详细]
2023-03-21 00:00 分类:问答Reuse validation as DB constraints
I\'m using the Play! framework and discovered while writing tests that I can save an 开发者_JAVA百科invalid model instance, e.g. with invalid values for some instance variables. I guess that\'s expect[详细]
2023-03-20 12:34 分类:问答How to implement constraints / conditional operators in Relax NG?
Consider the following Relax NG schema written in Compact Syntax key = element key { type, value } type = element type { text }[详细]
2023-03-20 11:30 分类:问答