answersLogoWhite

0


Best Answer

each column contains same type of data thus when you select a data type for a particular domain then DBMS will not accept any value of other data type.

Further information contributed by Ramona Maxwell. Please visit www.sqlsolver.com:

Domain constraints are a user-defined data type which enforces the integrity of the standard data types. A domain consists of all values permitted in a column. In constructing your database you would first select a standard data type such as VARCHAR or INT. You could then constrain or limit the data using NOT NULL, UNIQUE, CHECK, PRIMARY KEY or FOREIGN KEY. For example the CHECK constraint could limit INT data within your domain [column] to numbers less than 5000. You would thus define a custom data type using domain constraints.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

Constraints within a database are rules which control values allowed in columns and also enforce the integrity between columns and tables.

An example of a column constraint would be a 'CHECK' constraint on a column to limit the values allowed. For example, you could specify the datatype of a column to be tinyint, which can store values from 0-255, but then specify a CHECK constraint that limits values of 1-99, like this;

CREATE TABLE my_example (SomeColumn tinyint, CONSTRAINT

ChkValue CHECK (SomeColumn BETWEEN 1 and 99 ))

Another common constraint is UNIQUE, which ensures that the value in a column is unique within the table. This would be used on something like a customer code in a customer table, where you need to ensure that no two customers have the same code. This can also be done with a PRIMARY KEY constraint.

To enforce integrity, you can specify that a column has a FOREIGN KEY relationship with the values in another table, a concept at the heart of a relational database. An example of this would be a FK constraint on a 'sales order' table linking the order customer code back to the customer table. The FK serves two functions; (1) The code entered on the order must be valid and (2) the customer can't be deleted if there are any orders.

The simplest and most common constraint is the nullability of a column, specified with the NULL and NOT NULL operators when creating columns;

CREATE TABLE MyExample (ID int NOT NULL, Description varchar(50) NULL).

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is domain constraints in DBMS?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are roles and structural constraints in DBMS?

so it role is basically to manage the database


What is intension in dbms?

It is a constant value that gives the name, structure of table and the constraints laid on it.


What is a Multi-user DBMS Architecture?

A Multi-user DBMS Architecture is one big system of users and queries. The use of these are to over look and execute plans safely and does not violate and integrity constraints.


Consistency constraints in dbms?

it describes the instance of one entity is associated with each instances of an entity depending upon the range of cardinality constraints are two types they are minimum cardinality maximum cardinality


What ensures the value of the foreign key matches another tables primary key?

It is the DBMS that ensures the value of the foreign key matches another table's primary key when referential integrity constraints are enabled within the DBMS


What is functional dependency in DBMS?

A key is a set of attributes that uniquely identifies an entire tuple, a function dependency allow us to express constraints that uniquely identify the values of certain attribute.


What are highlights of DBMS?

NA_ what are highlights of advanced DBMS what are highlights of advanced DBMS what are highlights of advanced DBMS


Is java DBMS?

no, Java is not dbms.. Java is a programming language Dbms is database


Is SQL DBMS or RDBMS?

dbms


What are three types of dbms?

Three types of DBMS (Database Management Systems) include relational DBMS, object-oriented DBMS, and NoSQL DBMS. Relational DBMS organizes data into tables with rows and columns, object-oriented DBMS stores data as objects and classes, and NoSQL DBMS handles unstructured and semi-structured data with flexible schemas.


What are rows in dbms?

In DBMS the data is stored in the form of table . Each row in DBMS is known as tuple.


What are the importance of dbms in industrial environment?

importance of DBMS