Filter Queries

Found 1056 queries.

  • All the queries about database objects contain a subcondition to exclude from the result information about the system catalog.
  • Although the statements use SQL constructs (common table expressions; NOT in subqueries) that could cause performance problems in case of large datasets, it shouldn't be a problem in case of the relatively small amount of data in the system catalog of a database.

#341. Check as to wheteher the names of parameters are in the plural or in the singular form (Estonian version)

INFORMATION_SCHEMA+system catalog base tables

Check as to wheteher the names of routine parameters are in the plural or in the singular form. Make sure that you are consistent in naming.

General License: MIT (opens in new tab)

#342. Check as to wheteher the names of tables are in the plural or in the singular form (English version)

INFORMATION_SCHEMA+system catalog base tables

Check as to wheteher the names of tables are in the plural or in the singular form. Make sure that you are consistent in naming.

General License: MIT (opens in new tab)

#343. Check as to wheteher the names of tables are in the plural or in the singular form (English version) (aggregate view)

INFORMATION_SCHEMA+system catalog base tables

Check as to wheteher the names of tables are in the plural or in the singular form. Make sure that you are consistent in naming. Show the number of tables that name is in plural or in singular by table type.

Sofware measure License: MIT (opens in new tab)

#344. Check as to wheteher the names of tables are in the plural or in the singular form (Estonian version)

INFORMATION_SCHEMA+system catalog base tables

Check as to wheteher the names of tables are in the plural or in the singular form. Make sure that you are consistent in naming.

General License: MIT (opens in new tab)

#345. CHECK constraint cardinality is zero

INFORMATION_SCHEMA+system catalog base tables

Write correct constraints. Usually the constraint expression should refer to at least one column. A domain constraint expression should refer to the stub VALUE. For instance, the constraint CHECK(1=0) that is associated with a table T would prevent adding any rows to T. The value of the Boolean expression of this constraint is always FALSE.

Problem detection License: MIT (opens in new tab)

#346. CHECK constraints on columns with Boolean data

INFORMATION_SCHEMA only

Find check constraints that involve columns with the type Boolean.

General License: MIT (opens in new tab)

#347. CHECK constraints on columns with temporal data

INFORMATION_SCHEMA only

If your table contains columns with temporal data, then it will be appropriate to restrict the range of possible values in these columns because some of the values that belong to the type might not be appropriate (for instance, imagine a client who was born in 1100-12-03 or a contract that was registered in 3890-12-12- 12:45). If your table contains multiple columns with temporal data that denote events, then the rule about the order of the events must be enforced, if possible.

General License: MIT (opens in new tab)

#348. CHECK constraints that perhaps do not consider 'infinity' and '-infinity' special values

INFORMATION_SCHEMA+system catalog base tables

Find check constraints of base tables that cover exactly one column where the default value of the column is special value 'infinity' or '-infinity'. Find only such constraints that probably check a range of permitted values but do not consider that one of the values might be 'infinity' or '-infinity'. Such special values belong to the types DATE, TIMESTAMP, NUMERIC, REAL, and DOUBLE PRECISION.

Problem detection License: MIT (opens in new tab)

#349. CHECK constraints that perhaps incorrectly consider 'infinity' and '-infinity' special values

INFORMATION_SCHEMA+system catalog base tables

Such special values belong to the types DATE, TIMESTAMP, NUMERIC, REAL, and DOUBLE PRECISION. No value can be bigger than infinity or smaller than -infinity. If the check constraint cheks that a value must be bigger than -infinity or smaller than infinity, then it does not restrict (almost) anything.

Problem detection License: MIT (opens in new tab)

#350. CHECK constraints that use non-deterministic functions

INFORMATION_SCHEMA only

Discover incorrect usage of non-deterministic functions in CHECK constraints. Find base table columns and foreign table columns that have a CHECK constraint that refers to a non-deterministic function that returns current date/time/timestamp.

General License: MIT (opens in new tab)

#351. CHECK constraints with the cardinality bigger than one

system catalog base tables only

Find multicolumn CHECK constraints. Such constraints must be associated directly with a base table, i.e., these cannot be associated with a domain. Enforce as much data integrity as possible at the database level and prefer declarative constraints to a trigger.

General License: MIT (opens in new tab)

#352. CHECK constraints with the cardinality bigger than one that involve the same set of columns

system catalog base tables only

CHECK constraints with the cardinality bigger than one that involve the same set of columns. Make sure that there is no duplication.

General License: MIT (opens in new tab)

#353. CHECKs are associated with a column instead of the domain of the column

INFORMATION_SCHEMA+system catalog base tables

Find simple check constraints (involve one column) that are associated with a base table column instead of the domain of the column. Common checks of data in columns that share the same domain should be described at the level of domain not at the level of columns.

Problem detection License: MIT (opens in new tab)

#354. Column name contains the table name

INFORMATION_SCHEMA+system catalog base tables

Find columns that have the same name as the table. The names may have different uppercase/lowercase characters. Make sure that the naming style is consistent.

General License: MIT (opens in new tab)

#355. Column name is the same as the table name

INFORMATION_SCHEMA+system catalog base tables

Find columns that have the same name as the table. The names may have different uppercase/lowercase characters. Sometimes columns with such names are used as the key columns. Make sure that the naming style is consistent.

General License: MIT (opens in new tab)

#356. Columns defined in a subtable

INFORMATION_SCHEMA+system catalog base tables

Find columns that have been added to a subtable, i.e., these were not defined in its immediate supertable.

General License: MIT (opens in new tab)

#357. Columns for registration and update times

INFORMATION_SCHEMA only

Find base table columns that based on the names and data types are meant for registering registration time or update time. Make sure that the columns have the same properties.

General License: MIT (opens in new tab)

#358. Columns of base tables that hold truth values but do not have a default value (Boolean columns)

INFORMATION_SCHEMA only

Find columns of base tables that have type BOOLEAN but do not have a default value. There are only two truth values - TRUE and FALSE - in case of two-valued logic. Often it should be possible to select one of these as the default value of a column that has BOOLEAN type.

Problem detection License: MIT (opens in new tab)

#359. Columns of base tables that hold truth values but do not have a default value (non-Boolean columns)

INFORMATION_SCHEMA+system catalog base tables

Find non-foreign key columns of base tables that probably (based on the column name) contain values that represent truth values but do not have a default value. There are only two truth values - TRUE and FALSE - in case of two-valued logic. It could be possible to select one of these as the default value in case of the columns.

Problem detection License: MIT (opens in new tab)

#360. Columns of base tables that hold truth values but do not restrict the permitted values (non-Boolean columns)

INFORMATION_SCHEMA+system catalog base tables

Find non-foreign key columns of base tables that probably (based on the column name) contain values that represent truth values but do not have a have a check constraint. The constraint should restrict the permitted values with values that represent truth values TRUE and FALSE.

Problem detection License: MIT (opens in new tab)
# Name(activate to sort ascending) Goal(activate to sort ascending) Type(activate to sort ascending) Data source(activate to sort ascending) Last update(sorted descending, activate to sort ascending) License Actions
341 Check as to wheteher the names of parameters are in the plural or in the singular form (Estonian version) Check as to wheteher the names of routine parameters are in the plural or in the singular form. Make sure that you are consistent in naming. General INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
342 Check as to wheteher the names of tables are in the plural or in the singular form (English version) Check as to wheteher the names of tables are in the plural or in the singular form. Make sure that you are consistent in naming. General INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
343 Check as to wheteher the names of tables are in the plural or in the singular form (English version) (aggregate view) Check as to wheteher the names of tables are in the plural or in the singular form. Make sure that you are consistent in naming. Show the number of tables that name is in plural or in singular by table type. Sofware measure INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
344 Check as to wheteher the names of tables are in the plural or in the singular form (Estonian version) Check as to wheteher the names of tables are in the plural or in the singular form. Make sure that you are consistent in naming. General INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
345 CHECK constraint cardinality is zero Write correct constraints. Usually the constraint expression should refer to at least one column. A domain constraint expression should refer to the stub VALUE. For instance, the constraint CHECK(1=0) that is associated with a table T would prevent adding any rows to T. The value of the Boolean expression of this constraint is always FALSE. Problem detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
346 CHECK constraints on columns with Boolean data Find check constraints that involve columns with the type Boolean. General INFORMATION_SCHEMA only MIT (opens in new tab) View (opens in new tab)
347 CHECK constraints on columns with temporal data If your table contains columns with temporal data, then it will be appropriate to restrict the range of possible values in these columns because some of the values that belong to the type might not be appropriate (for instance, imagine a client who was born in 1100-12-03 or a contract that was registered in 3890-12-12- 12:45). If your table contains multiple columns with temporal data that denote events, then the rule about the order of the events must be enforced, if possible. General INFORMATION_SCHEMA only MIT (opens in new tab) View (opens in new tab)
348 CHECK constraints that perhaps do not consider 'infinity' and '-infinity' special values Find check constraints of base tables that cover exactly one column where the default value of the column is special value 'infinity' or '-infinity'. Find only such constraints that probably check a range of permitted values but do not consider that one of the values might be 'infinity' or '-infinity'. Such special values belong to the types DATE, TIMESTAMP, NUMERIC, REAL, and DOUBLE PRECISION. Problem detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
349 CHECK constraints that perhaps incorrectly consider 'infinity' and '-infinity' special values Such special values belong to the types DATE, TIMESTAMP, NUMERIC, REAL, and DOUBLE PRECISION. No value can be bigger than infinity or smaller than -infinity. If the check constraint cheks that a value must be bigger than -infinity or smaller than infinity, then it does not restrict (almost) anything. Problem detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
350 CHECK constraints that use non-deterministic functions Discover incorrect usage of non-deterministic functions in CHECK constraints. Find base table columns and foreign table columns that have a CHECK constraint that refers to a non-deterministic function that returns current date/time/timestamp. General INFORMATION_SCHEMA only MIT (opens in new tab) View (opens in new tab)
351 CHECK constraints with the cardinality bigger than one Find multicolumn CHECK constraints. Such constraints must be associated directly with a base table, i.e., these cannot be associated with a domain. Enforce as much data integrity as possible at the database level and prefer declarative constraints to a trigger. General system catalog base tables only MIT (opens in new tab) View (opens in new tab)
352 CHECK constraints with the cardinality bigger than one that involve the same set of columns CHECK constraints with the cardinality bigger than one that involve the same set of columns. Make sure that there is no duplication. General system catalog base tables only MIT (opens in new tab) View (opens in new tab)
353 CHECKs are associated with a column instead of the domain of the column Find simple check constraints (involve one column) that are associated with a base table column instead of the domain of the column. Common checks of data in columns that share the same domain should be described at the level of domain not at the level of columns. Problem detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
354 Column name contains the table name Find columns that have the same name as the table. The names may have different uppercase/lowercase characters. Make sure that the naming style is consistent. General INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
355 Column name is the same as the table name Find columns that have the same name as the table. The names may have different uppercase/lowercase characters. Sometimes columns with such names are used as the key columns. Make sure that the naming style is consistent. General INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
356 Columns defined in a subtable Find columns that have been added to a subtable, i.e., these were not defined in its immediate supertable. General INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
357 Columns for registration and update times Find base table columns that based on the names and data types are meant for registering registration time or update time. Make sure that the columns have the same properties. General INFORMATION_SCHEMA only MIT (opens in new tab) View (opens in new tab)
358 Columns of base tables that hold truth values but do not have a default value (Boolean columns) Find columns of base tables that have type BOOLEAN but do not have a default value. There are only two truth values - TRUE and FALSE - in case of two-valued logic. Often it should be possible to select one of these as the default value of a column that has BOOLEAN type. Problem detection INFORMATION_SCHEMA only MIT (opens in new tab) View (opens in new tab)
359 Columns of base tables that hold truth values but do not have a default value (non-Boolean columns) Find non-foreign key columns of base tables that probably (based on the column name) contain values that represent truth values but do not have a default value. There are only two truth values - TRUE and FALSE - in case of two-valued logic. It could be possible to select one of these as the default value in case of the columns. Problem detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
360 Columns of base tables that hold truth values but do not restrict the permitted values (non-Boolean columns) Find non-foreign key columns of base tables that probably (based on the column name) contain values that represent truth values but do not have a have a check constraint. The constraint should restrict the permitted values with values that represent truth values TRUE and FALSE. Problem detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)