You are on page 1of 12

KEYS IN DATABASE

MANAGEMENT SYSTEM

NAMES:
TANISHA-131
PRASHAM-132
ABHAY-133
YASH MEHTA-135
SAKSHI-140
WHAT IS DBMS?
A Database Management System (DBMS) is software designed to store,
retrieve, define, and manage data in a database.

DBMS software primarily functions as an interface between the end user and
the database, simultaneously managing the data, the database engine, and
the database schema in order to facilitate the organization and manipulation
of data.

 Stands for "Database Management System." In short, a DBMS is a


database program. Technically speaking, it is a software system
that uses a standard method of cataloging, retrieving, and running
queries on data. The DBMS manages incoming data, organizes it,
and provides ways for the data to be modified or extracted by users
or other programs.
EXAMPLES OF DBMS
 Some DBMS examples include MySQL,
PostgreSQL, Microsoft Access, SQL
Server, FileMaker, Oracle, RDBMS,
dBase, Clipper, and FoxPro. Since there
are so many database management
systems available, it is important for there
to be a way for them to communicate with
each other. For this reason, most database
software comes with an Open Database
Connectivity (ODBC) driver that allows the
database to integrate with other
databases. For example, common SQL
statements such as SELECT and INSERT
are translated from a program's proprietary
syntax into a syntax other databases can
understand.
KEYS AND TYPES OF DBMS
 The types of DBMS are=
 1)SUPER KEY = A super key is an attribute or combination of attributes in a relation
that identifies a tuple uniquely within relation . It is the most general type of key .

 2)CANDIDATE KEY =Can be a single column or combination of more than one column.
A minimal super key is called a candidate key .

 3)PRIMARY KEY=A primary key is a candidate key that is selected by data


base designer to identify students uniquely in a relation .A relation may contain
many candidate keys .when the designer selects one of them to identify a
student in relation ,it becomes a primary key .
 4) ALTERNATE KEY =The candidate key that are not selected as
primary key are known as alternate key .

 5)COMPOSITE KEY =A primary key that consists of two or more


attributes is known a composite key .

 6)FOREIGN KEY =A foreign key is an attribute or set attributes in


a relation whose values match a primary key in another relation.
WHAT IS UNIQUE KEY IN DBMS?
A unique key is a set of one or more than one fields/columns of a
table that uniquely identify a record in a database table.
The unique key and primary key both provide a guarantee for
uniqueness for a column or a set of columns.

Points-
A Unique Key is used to prevent duplicate values in a column.
Unique Key allows one value as NULL value.
Unique Key can be more than one if you need it in the table.
Unique Key ensures that data is not duplicated in two rows in the database.
DIFFRENTIATION:

UNIQUE KEY PRIMARY KEY

 1) Unique key is a constraint that is  1) Primary Key is a column that is


used to uniquely identify a tuple in a used to uniquely identify each
table. tuple of the table.

 2) Multiple unique keys can present  2) It is used to add integrity


in a table. constraints to table.

 3) NULL values are allowed in case  3) Only one primary key is allowed
of a unique key. to be used in a table.
WHY DO WE NEED KEYS IN
DBMS?

 Keys are very important part of


database model.
 They are used to establish and identify
relationships between tables and also
to uniquely identify any record or row
of data inside a table.
 A key can be a single attribute or a
group of attributes, where the
combination may act as a key.
 Keys help you to identify any row
of data in a table. In a real-world
application, a table could contain
thousands of records. Moreover,
the records could be duplicated.
Keys ensure that you can
uniquely identify a table record
despite these challenges.
 Allows you to establish a
relationship between and identify
the relation between tables
 Help you to enforce identity and
integrity in the relationship.
Database Languages
Data Definition Language (DDL)
Create, Alter, Drop

Data Manipulation Language (DML)


Insert, Select, Update, Delete

Data Control Language (DCL)


Grant, Revoke

Transaction Control Language (TCL)


Commit, Rollback
What are the Current Trends?

Multimedia Databases

Distributed Databases

Document-oriented Database

Mobile & Embedded Databases


QUESTIONS?
1. Consider attributes ID , CITY and NAME . Which one of this can be
considered as a super key ?
2. The subset of super key is a candidate key under what condition ?
3. A _____ is a property of the entire relation, rather than of the individual
tuples in which each tuple is unique.
4. A attribute in a relation is a foreign key if the _______ key from one relation
is used as an attribute in that relation .
5. Which key is used to make relations between two tables? Foreign
6. A key can be primary key?
7. State the types of keys in DBMS?
8. What is unique key in DBMS?
9. Why do we need keys in DBMS?
10. Conclude the topic keys in DBMS.

You might also like