0% found this document useful (0 votes)
26 views18 pages

A-Level RDMS & Keys

This document provides an overview of relational database management systems (RDMS) and different types of keys used in databases. It discusses that an RDMS uses a structured collection of data that can be accessed by different applications. It also summarizes the five main types of keys in a database: candidate key, primary key (PK), secondary key (SK), foreign key (FK), and composite key.

Uploaded by

Asra Bibi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views18 pages

A-Level RDMS & Keys

This document provides an overview of relational database management systems (RDMS) and different types of keys used in databases. It discusses that an RDMS uses a structured collection of data that can be accessed by different applications. It also summarizes the five main types of keys in a database: candidate key, primary key (PK), secondary key (SK), foreign key (FK), and composite key.

Uploaded by

Asra Bibi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

A-LEVEL

COMPUTER SCIENCE BY
AAQIB KHAN - AKI
CHAPTER - 6
DATABASE LECTURE 2
RDMS & KEYS

YOUTUBE CHANNEL:
CS BY AQIB KHAN
CONTACT: +92 314 5030717
(9678)
SANQiR AS LEVEL
-

A
cH8 5)

->

RECTURE#2 outubeis]
ATONAL
DATABASE
structured collection ofitems of data that
↑ATABASE can A
differentapplication pOOgRAM
Be
by
accessed

-
#s
I TABLE
Types ofDATABASE

-
-
pisdational
DB
2 OR TABLE
MORE
called Based
Approach thatare link
gether
-
Also ~
To

Form Relationship
-

- Relational Pipity
# Project-TABLE
1)

EmpcEMPLOYETwane
TABLE

Column/field/Attribute
-

~>
at ame
salary
DO B

ABusiness Keeps Separateroll


files and
defiles Row/RecoRD/Tuple

openotatinocators
- ->

EachFile is asses
By Differen
Application
-

en

poico
file Based p| PRimary Key (PK) Enique identifer
=

Approachis Limited Because: -

70 Reign (*)(F1) Setof


=

attribute in

① Stage space is wasted when data items are duplicated TABLEthatRefer


One

applicationsand data Rexfondant


Byseparate some to PK another table
in

② Data altered Application


By
Can Be One

and notby anothers -

itthen Become
consistent
Enquiries
1

pretendstructure
atan
Depends
available can
of
on

and the software used


not independent
FK

g.***
1
↑ S

Onique Erique Unique


5
Types ofKEYS in RDmS

① CamiDATE KEY -->


Any attribute/ Attributes that
can

Qualify as
Unique KEY
WPK(PRimary KEY) ->Value in each TupLEis
Unique
candidate key that
③ SK(SecondaryKEY) -> is an
a is

alternative to
primary key
Ek(foign KEY) -
I Attribute/Attributes
to
-
in one

anothere
table that
to form
link

primary key table


a in

a Relation

CompositE KEY -- when 2 Attributes combined together to
make one
primary Kay

CompositeKEY
-ooooon,wolnusi
Musq

p
nes

ComposiEKey
80 sil
0
->

->

2
-

L
-
->

-> C

->

->
o
->

-5

->
#as
Redundancy
Repeated Data
->

Database
exog Adata
-

structure Builtfrom One OR

more Columns in
Database
dats
To
speed up Scarcing FR
ppQ ->

X

->

② ⑤
->

or -ia/"

->


->


->

->

->
ppQ >
-










situation in which
ELArioNSHlSEHas a
Foreign By
thatRefers to a

primary anothers table


Key in

->
--

f--

-2
-

->
Many
may
->

PHOTO
* USeR < TEXTPOST
=
2ay!
- pental
Integrity
S that does notcontain any values of
database
property of
a a
&

Foreign that not


key matched to corresponding primary
key

0

Δ Retential <

- integrity
-
297
- -

May -
one

o
PK

OFK

o
⑳7
④I
->

May
-

2
-

<

C 5
man

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy