Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Class notes about Database management system

Rating
-
Sold
-
Pages
23
Uploaded on
25-06-2022
Written in
2021/2022

Class notes about Database management system

Institution
Course

Content preview

Keys in a Relational model

Key is a fundamental concept in the relational model in which it provides the basic
mechanism for retrieving tuples within a database. It specifies how tuples within a given
relations are distinguished and expressed in terms of attributes.

Key can be a single attribute or a group of attributes, where the combination
may act as a key. These attribute values can uniquely identify the tuples and no two
tuples in a relation are allowed to have exactly the same value for all attributes.

For e.g. rollno in student table, cust_no in a customer table, ac_no in Acconunt
table etc.

Super key

Super Key is defined as a set of attributes within a table that can uniquely identify each
record within a table. Super Key is a superset of Candidate key

.Eg: In a customer table Cust_id, Loan_no , (Cust_id , Cust_name), (Cust_id,
Loan_no),(Cust_name,Loan_no )

In a student table rollno,(stud_name,address),phoneno

Candidate Key

Candidate keys are defined as the minimal set of fields which can uniquely identify each
record in a table. It is an attribute or a set of attributes that can act as a Primary Key for a table
to uniquely identify each record in that table. There can be more than one candidate key.


 A candiate key can never be NULL or empty. And its value should be unique.
 There can be more than one candidate keys for a table.
 A candidate key can be a combination of more than one columns(attributes).

Eg: In the customer table Cust_id and Loan_no are candidate keys.

In the student table rollno and phoneno are candidate keys.

,Primary Key
Primary key is a candidate key that is most appropriate to become the main key
for any table. It is a key that can uniquely identify each record in a table.
• A Primary key is selected from a set of candidate keys.
• This is done by database admin or database designer.
• Two rows can't have the same primary key value
• The primary key field cannot be null.
• A table can have multiple candidate keys but only a single primary key.
Eg: in customer table Cust_id can be taken as primary key.
In student table rollno can be taken as primary key.
Alternate Key
The candidate keys which are not selected as primary key are known as secondary
keys or alternative keys.
• It is a column or group of columns in a table that uniquely identify every row in
that table.
• A table can have multiple choices for a primary key but only one can be set as
the primary key. All the keys which are not primary key are called an Alternate
Key.
Eg: In customer table Loan_no is alternate key.
In student table phoneno is the alternate key.




Foreign key
A foreign key is a key used to link two tables together. This is sometimes also called as
a referencing key.It is a column or a combination of columns whose values match a
Primary Key in a different table.
The relationship between 2 tables matches the Primary Key in one of the tables with a
Foreign Key in the second table.They act as a cross-reference between tables

, Relational Database Management System(RDBMS)
A Relational Database management System(RDBMS) is a database management
system based on the relational model introduced by E.F Codd. In relational model, data is
stored in relations(tables) and is represented in form of tuples(rows).
RDBMS is used to manage Relational database. Relational database is a collection of
organized set of tables related to each other, and from which data can be accessed easily.
Relational Database is the most commonly used database these days.
Relational database model, a table is a collection of data elements organised in terms of
rows and columns. A table is also considered as a convenient representation of relations. But a
table can have duplicate row of data while a true relation cannot have duplicate data. Table is
the most simplest form of data storage.
single entry in a table is called a Tuple or Record or Row. A tuple in a table represents
a set of related data.
A table consists of several records(row), each record can be broken down into several
smaller parts of data known as Attributes. For eg: An Employee table consist of four
attributes, ID, Name, Age and Salary.
• A RDBMS is an extension of a DBMS

Written for

Institution
Course

Document information

Uploaded on
June 25, 2022
Number of pages
23
Written in
2021/2022
Type
Class notes
Professor(s)
Sunitha nair
Contains
All classes

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
sandrasujesh

Get to know the seller

Seller avatar
sandrasujesh UIT Alppuzha
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
6
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions