In a SQL Server database, a table is made up of several elements, including:
- Columns: These represent the fields or attributes of the table, and define the type of data that can be stored in each field.
- Rows: Also known as records, these represent the individual data entries in the table.
- Primary Key: A unique identifier that is used to distinguish each row in the table.
- Foreign Keys: Columns that are used to establish a link between two tables, allowing for the creation of relationships between tables.
- Indexes: These are used to optimize the performance of queries on the table, by providing a quick way to look up rows based on specific values.
- Constraints: These are used to enforce rules on the data stored in the table, such as limiting the values that can be entered in a particular field, or ensuring that certain fields are not left null.
- Triggers: Special type of stored procedure that is automatically executed in response to certain events on the table like insert, update or delete.
All these elements work together to define the structure and behavior of the table, and ensure that the data stored in it is accurate, consistent, and easily accessible.
This module introduced you to the following terms:
- clustered index: A clustered index is a special type of index that reorders the way records in the table are physically stored. Therefore table can have only one clustered index.
The leaf nodes of a clustered index contain the data pages
- data integrity: Data integrity is the maintenance of, and the assurance of the accuracy and consistency of, data over its entire life-cycle, and is a critical aspect to the design, implementation and usage of any system which stores,
processes, or retrieves data
- denormalize: Denormalization is a strategy used on a previously-normalized database to increase performance.
- entity: An entity is any object in the system that we want to model and store information about. Entities are usually recognizable concepts, either concrete or abstract, such as person, places, things,
or events which have relevance to the database.
- entity integrity:Entity integrity is a basic constraint of database relational model (abbreviated RM) that refers to the morphology of the primary key but afterwards, the same format is applied to the foreign key and, also to any of simple components
of any of two.
- foreign key:A foreign key is a column or group of columns in a relational database table that provides a link between data in two tables.
- identity flag: An identity flag is an attribute that ensures that values in a column are automatically incremented and unique within the column
- normalize
- primary key:A column whose values uniquely identify a row in a table.
- relational integrity:Guaranteeing the quality of data between tables in a database by enforcing the relationships between those tables.
- unique key:One or more columns that cannot contain duplicate data in a table. Similar to a primary key, except that it doesn’t have to uniquely identify a row of data.
In the next module, you will learn about Structured Query Language (SQL), the standard language used by all relational databases.