Pod - Microproject (28,31,32)
Pod - Microproject (28,31,32)
Maharashtra State
Board of Technical Education
Certificate of completion
ofMicro-project assessment at the end of the Diploma programme
(By respective Head of the Department and Head of the institute)
This is certifythat Mr Noorain Don, Owais Ansari ,Mahadi Kazi
enrollment no2100020175,2100020173,2100020174,has
code 0002.
Signature
Signature
Seal of institute
Head of the Department Head of the Institute
Page 1 of 12
DATABASE KEYS
Group Members:
SR NAME ROLL NO.
NO.
1 Ansari Owais 210831
2 Kazi Mahadi 210832
3 Don Noorain 210831
Page 2 of 12
DATABASE KEYS
ANJUMAN-I-ISLAM’S
Actualmethodologyfollowed:
I. Week 1: The teacher made a group of students and gave the micro-
project topic.
Page 3 of 12
DATABASE KEYS
III. Week 3:The information was searched on the internet and noted.
VII. Week 7:The Project & report was submitted to the teacher.
ACTION PLAN
Sr. Details of Activities Planned Start Planned Finish Name of responsible
No Date Date team members
1. Project overview and 15thOctober 23thOctober Noorain,
planning
2. Programme and report 17th October 28thOctoberr , Mahadi
editing
3. Finalizing report and 29thOctober 4thNovember Owais
presentation planning
4. Report was completed 20th November 4th December Noorain,Owais,Mahadi
Page 4 of 12
DATABASE KEYS
Keys are very important part of Relational database. They are used to establish and
identify relations tables. A key in DBMS is an attribute or a set of attributes that help
to uniquely identify a tuple (or row) in a relation (or table). Keys are also used to
establish relationships between the different tables and columns of a relational
database. Individual values in a key are called key values.
There are broadly four types of keys in DBMS. All these types of keys in SQL must
be implemented appropriately for the relevant database to negate redundancy. Correct
identification will lead to database accuracy, improving results in a limited time. Let’s
explore these DBMS keys to learn more about what are keys in SQL.
Super Key
Candidate Key
Primary Key
Foreign Key
Super Key
Candidate Key
Page 5 of 12
DATABASE KEYS
Primary Key
Primary Keyis a one fields/columns of a table that uniquely identify a record in
database table.
Foreign Key
Primary Key of one table become a attributes of another table is called Foreign Key.
Super Key
Super Key is defined as a set of attributes within a table that uniquely identifies
each record within a table.
Primary key, Unique key, Alternate key, Candidate Key are subset of Super Keys.
The Primary Key of a table is picked from the super key set to be made the table’s
identity attribute.
Customer
Example:
In the Customer table Cust_ID, Cust_name,Cust_street ,Cust_city, and account_no are Super key.
Customer{ Cust_ID,Cust_name,Cust_street,Cust_city, account_no}
Page 6 of 12
DATABASE KEYS
Candidate Key
A Candidate Key is a set of one or more fields/columns that can identify a record
uniquely in a table.
Candidate keys are defined as the set of fields from which primary key can be
selected. There can be multiple Candidate Keys in one table.
There can be more candidate keys than just one for any table, but they can never
be empty.
Every candidate key carries unique information and value. Besides these
characteristics, a combination of attributes also works as a set of candidate keys.
There can be more than one candidate keys in a table.
Candidate Key are subset of Super Keys.
Customer
Example:
In Customer table Cust_ID,Cust_name,Cust_city ,account_no are Candidate Key.
Customer{ Cust_ID,Cust_name,Cust_city, account_no}
Page 7 of 12
DATABASE KEYS
Primary Key
Primary key is a one fields/columns of a table that uniquely identify a record in
database table.
Every value of the primary key must be different with no repetitions. Amid many
details, a primary key is the most significant one to understand what are keys and
what is primary key in DBMS.
One table can have only one primary key constraint. Any value in the primary key
cannot be changed by any foreign keys (explained below) which refer to it.
Customer
Example:
In Customer table Cust_ID is Primary Key.
Customer{ Cust_ID},
Page 8 of 12
DATABASE KEYS
A composite Key is a set of two or more attributes that help identify each tuple in a
table uniquely.
The attributes in the set may not be unique when considered separately.
However, when taken all together, they will ensure uniqueness. The
concatenated key’ is another name for a composite key.
Customer
Example:
In Customer table Cust_ID and account_no are is Composite Key.
Customer{ Cust_ID,account_no
Page 9 of 12
DATABASE KEYS
Foreign Key
Foreign key represents relationship between tables.
A Foreign key is a column(or a group of columns) whose values are derived from
the ‘Primary Key’ of other table.
Foreign keys are essential for maintaining a difference between two entities that
might be linked with the same information but do not share similar information.
In such cases, the tables are linked to maintaining a connection but do not entirely
work as a replacement for each other.
For instance, any individual working for the marketing department might have
marketing department information in its employee table, but that does not mean
the table can be similar to the department table held by the marketing department.
Page 10 of 12
DATABASE KEYS
Customer
Account
Example:
We can have account_no column in the Customer table which is pointing to account_no column in a
account table where it a primary key.
Page 11 of 12
DATABASE KEYS
Resources used:
4 Application MS Word - -
THANK YOU!!!!!!!
Page 12 of 12