- Primary Key:-

                                Ensures that the attribute values are unique and can uniquely identify each tuple (row) in the relation.

 - Foreign Key:-

                            Defines a referential integrity constraint that establishes a relationship between two relations based on the values of the attribute.

 - Not Null:-

              Specifies that the attribute must have a value and cannot be left empty or null. 

- Check Constraint:-

                             Defines a condition or expression that the attribute values must satisfy.


Domains play a crucial role in maintaining data integrity and ensuring that the data stored in a database adheres to the defined rules and constraints. They provide a way to enforce consistency, validity, and accuracy of data within the database schema. 

Domains:-

             A domain refers to the set of possible values that an attribute can take within a database. It defines the data type and constraints for an attribute. Commonly used domains include integers, floating-point numbers, strings, dates, and booleans. Domains ensure that attribute values adhere to specific data types and constraints, maintaining data integrity and validity.


 Relations (Tables):-

                              In a relational database, a relation, also known as a table, is a two-dimensional structure that organizes and stores data. A relation consists of rows (tuples) and columns (attributes). Each row represents a unique record, while each column represents a specific attribute or property. Relations provide a structured way to organize and retrieve data, facilitating efficient querying, manipulation, and storage.

 Keys: -

         Keys are attributes or combinations of attributes that uniquely identify each record within a relation. They play a critical role in maintaining data integrity and establishing relationships between tables. Here are some common types of keys: 

1. Primary Key: -

                        A primary key is a unique identifier for each record in a relation. It ensures the uniqueness and integrity of data within the table. Typically, a primary key consists of one or more attributes that uniquely identify each tuple.

 2.Foreign key:-

                    A foreign key establishes a relationship between two relations by referencing the primary key of another relation. It allows for the representation of associations and dependencies between entities in the database. The foreign key in one relation refers to the primary key in another relation.

 3. Candidate Key:-

                            A candidate key is a minimal set of attributes that can uniquely identify each tuple within a relation. It is a potential candidate for being the primary key. A relation can have multiple candidate keys.

 4. Super Key: -

                    A super key is a set of attributes that can uniquely identify each tuple in a relation. It may contain more attributes than necessary to uniquely identify the tuples.

 5. Alternate Key: -

                         An alternate key is a candidate key that was not chosen as the primary key. It provides an alternative option for uniquely identifying records within a relation. 

Keys allow for data retrieval, establishing relationships between tables, and enforcing referential integrity constraints.

 By utilizing domains, relations, and keys, relational databases provide a structured and efficient means of organizing, storing, and retrieving data. The combination of these concepts forms the foundation of the relational model and enables the effective management and manipulation of data within a database system