Important Definitions:
Data Base Management System (DBMS):
Refers to a software that is responsible for storing databases.
A database along with Data Base Management System (DBMS) is
said to be database system.
Data Redundancy:
Duplication of data is known as Data Redundancy.
Data Inconsistency:
Mismatched copies of same data, is known as data inconsistency.
Relation:
A table which contains Tuples (Rows) and Attributes (Columns).
Named collections of occurrences of a specific given type of logical
record.
Examples of DBMS:
1. MySQL
2. Oracle Database
3. Microsoft SQL Server
4. PostgreSQL
Domian:
A domain is the set of all possible values that an attribute (column)
in a table can have. It defines the data type, constraints, and valid
range or format of the values for that column.
Tuple:
A tuple is a single row in a table (relation) that represents a record
or an entity.
It consists of a set of related data values, one for each attribute
(column) in the table.
For example, in a student table, a tuple may contain one student's
data such as (101, "Rahul", 18, "Science").
Attribute:
An attribute is a column in a table that represents a property or
characteristic of an entity.
Each attribute has a domain specifying the type of data it can hold
(like integers, strings, dates).
For example, in a student table, attributes could be StudentID, Name,
Age, and Stream.
Cardinality:
Cardinality refers to the number of tuples (rows) in a relation
(table). It indicates the size or number of records in the table.
It can also refer to the relationship between tables, showing how
many instances of one entity relate to instances of another (e.g., one-
to-one, one-to-many).
For example, if the student table has 50 rows, its cardinality is 50.
Degree:
Degree is the number of attributes (columns) in a relation (table).
It tells how many fields each tuple has.
For example, if a Student table has columns Student_ID, Name, Age,
Stream, it has a degree of 4.
In summary:
A tuple is a row (record),
an attribute is a column (field),
cardinality is the count of tuples (or the type of relationship in
entity sets), and
degree is the count of attributes in a relation.
Keys:
Primary Keys:
Set of one or more attributes having value that are unique among the
relation and thus are uniquely identified as tuple(rows).
Has no duplicates (Non-redundant):
Candidate Keys:
Similar to primary keys, but can have multiple candidate keys.
Candidate keys can contain NULL values.
All primary keys are candidate keys, but not all candidate keys
become primary keys.