Domains:-
A domain definition specifies the kind of data represented by the attribute. more particularly, a domain is the set of all possible values that an attribute may validly contain.
Domains are often confused with data types, but this is inaccurate. data type is physical concept while domain is a logical one.
"Number" is a data type and "Age" is a domain. To give another example "Streetname" and "Surname" might both be represented as text fields, but they are obviously different kinds of text fields; they belong to different domains.
So in short, we can say that domain is a set of allowable values for one or more attributes.
Domain: (Data type + Format + Validation)
-> In a relational model, each attribute carries a domain of its own.
-> A domain refers to the set of unique values used to define that attribute and will act as a "model" set of values.
Relation:-
A relation is a two - dimensional table i.e information is arranged in rows and columns.
It is called a relation because the data values in the table are not homogenous i.e not if the same type and we can say that values in a row are not homogenous.
-> A relation, or table, in a relational database has some common properties.
1. its name must be unique in the database, for example - a database cannot contain multiple tables of the same name.
2. Each relation must have a set of columns or attributes, and it must have a set of rows to contain the data. As with the table names, no attributes can have the same name.
3. A tuple (or row) can be a duplicate. In practice, a database might actually contain duplicate rows, but there should be practices in place to avoid this, such as the use of unique primary keys (next up).
-> Given that a tuple cannot be a duplicate, it follows that a relation must contain at least one attribute (or column) that identifies each tuple (or row) uniquely. This is usually the primary key. This primary key cannot be duplicated.
Predicate in DBMS
Sometimes expressions need to be evaluated to true or false, based on this decision of true or false then the records are retrieved from the database tables
A predicate is a condition expression which evaluates and results in boolean value either true or false which enables decision making in retrieving and manipulating a record
A predicate is a condition that is specified for:
-> Filtering the data using the WHERE clause,
-> Pattern matching in LIKE operator,
-> Specifying a set of list for using IN operator,
-> Manipulating a range of values using BETWEEN operator, etc
A domain definition specifies the kind of data represented by the attribute. more particularly, a domain is the set of all possible values that an attribute may validly contain.
Domains are often confused with data types, but this is inaccurate. data type is physical concept while domain is a logical one.
"Number" is a data type and "Age" is a domain. To give another example "Streetname" and "Surname" might both be represented as text fields, but they are obviously different kinds of text fields; they belong to different domains.
So in short, we can say that domain is a set of allowable values for one or more attributes.
Domain: (Data type + Format + Validation)
-> In a relational model, each attribute carries a domain of its own.
-> A domain refers to the set of unique values used to define that attribute and will act as a "model" set of values.
Relation:-
A relation is a two - dimensional table i.e information is arranged in rows and columns.
It is called a relation because the data values in the table are not homogenous i.e not if the same type and we can say that values in a row are not homogenous.
-> A relation, or table, in a relational database has some common properties.
1. its name must be unique in the database, for example - a database cannot contain multiple tables of the same name.
2. Each relation must have a set of columns or attributes, and it must have a set of rows to contain the data. As with the table names, no attributes can have the same name.
3. A tuple (or row) can be a duplicate. In practice, a database might actually contain duplicate rows, but there should be practices in place to avoid this, such as the use of unique primary keys (next up).
-> Given that a tuple cannot be a duplicate, it follows that a relation must contain at least one attribute (or column) that identifies each tuple (or row) uniquely. This is usually the primary key. This primary key cannot be duplicated.
Predicate in DBMS
Sometimes expressions need to be evaluated to true or false, based on this decision of true or false then the records are retrieved from the database tables
A predicate is a condition expression which evaluates and results in boolean value either true or false which enables decision making in retrieving and manipulating a record
A predicate is a condition that is specified for:
-> Filtering the data using the WHERE clause,
-> Pattern matching in LIKE operator,
-> Specifying a set of list for using IN operator,
-> Manipulating a range of values using BETWEEN operator, etc