Professional Documents
Culture Documents
used to set one row apart from every other row in a table. A super key may contain
characteristics that aren't necessarily required for a row's unique identification. For
instance, a super key in a student table may be a combination of the student's name,
email address, and student ID.
• Candidate key: A candidate key is the bare minimum collection of characteristics
that let each row in a table to be identified exclusively. In other words, a super key
with the feature that no subset of the key can also uniquely identify a row is
referred to as a candidate key. A candidate key must have the quality that no two
rows in the table can share. It is a subset of a super key.
the exact same set of attribute values are used for that key. A potential key in a
student database, for instance, may be the student ID column since no other group
of columns can adequately uniquely identify each row in the table.
In conclusion, a candidate key is a minimal collection of characteristics that can
uniquely identify a row in a database whereas a super key is any set of attributes
that can uniquely identify a row in a table without the need of a valid subset of the
key.
2. In a database management system, a column's or group of columns' values must
be unique, and this is enforced by using both primary keys and unique keys. Yet
the two are different in several ways.
COURSE: DATABASE MANAGEMENT ASSIGNMENT 1
INDEX NUMBER: PS/CSC/21/0061
Several unique keys may be included in a table, and each unique key may contain
null values (unless it is also specified as a not-null constraint). By using the unique
key column(s) in a foreign key connection, a unique key can be utilized to enforce
referential integrity restrictions between tables.
A primary key is the principal identifier of a row and must be distinct, non-null,
and immutable. In contrast, a unique key is a column or collection of columns that
has a unique value for each row and may be used to impose referential integrity
constraints or as a secondary identifier.
COURSE: DATABASE MANAGEMENT ASSIGNMENT 1
INDEX NUMBER: PS/CSC/21/0061
ENTITY SET
An entity set is a group of similar kind of entities. It may contain entities
with attribute sharing similar values. Entities are represented by their
properties, which also called attributes. All attributes have their separate
values. For example, a student entity may have a name, age, class, as
attributes.
RELATIONSHIP SET
A relationship set is a set of relationships of same type.
EXAMPLE
ATTRIBUTES
Attributes are the properties which describes the entities of an entity set.
1. Partial participation
2. Total participation
1. Partial Participation-
COURSE: DATABASE MANAGEMENT ASSIGNMENT 1
INDEX NUMBER: PS/CSC/21/0061
Partial participation is represented using a single line between the entity set and
relationship set.
2. Total Participation-
Total participation is represented using a double line between the entity set and
relationship set.
1. Many-to-many cardinality (m:n)
2. Many-to-one cardinality (m:1)
3. One-to-many cardinality (1:n)
4. One-to-one cardinality (1:1)
For Cardinality Constraints / Ratios-
Cardinality constraint defines the maximum number of relationship instances in
which an entity can participate.
There are 4 types of cardinality ratios-
COURSE: DATABASE MANAGEMENT ASSIGNMENT 1
INDEX NUMBER: PS/CSC/21/0061
1. Many-to-many cardinality (m:n)
2. Many-to-one cardinality (m:1)
3. One-to-many cardinality (1:n)
4. One-to-one cardinality (1:1)
COURSE: DATABASE MANAGEMENT ASSIGNMENT 1
INDEX NUMBER: PS/CSC/21/0061
1. Many-to-many cardinality (m:n)
2. Many-to-one cardinality (m:1)
3. One-to-many cardinality (1:n)
4. One-to-one cardinality (1:1)
COURSE: DATABASE MANAGEMENT ASSIGNMENT 1
INDEX NUMBER: PS/CSC/21/0061