Professional Documents
Culture Documents
Duration : 2hrs
1
Detailed Syllabus
2.2. Concepts of Keys
Candidate key
Primary key
Alternate key
Composite key
Surrogate key
Foreign key
2.3. Fundamental Integrity Rules
Entity Integrity
Referential Integrity
Domain Constraints
Key Constraints
2
Relational Objects
Keys
Employee
E-Name Pointer E-No E-Name D-No
De Silva 179 Silva 7
Dias 857 Perera 4
Perera 342 Dias 7
Silva 719 De Silva 5
10
Index: Employee Name
Employee
E-Name Pointer E-No E-Name D-No
Alwis 179 Silva 7
Bandara 857 Perera 4
Costa 342 Dias 7
De Silva 719 De Silva 5
Dias 587 Alwis 4
Opatha 432 Costa 6
Peiris 197 Zoysa 2
Perera 875 Peiris 4
Silva 324 Vaas 7
Vaas 917 Bandara 3
Wickrama 785 Opatha 2
Zoysa 234 Wickrama 1
11
Search: Employee Dias
E-Name Pointer
Alwis
Bandara
Index Costa
De Silva
Improves Dias
Opatha
performa Peiris
nce. Perera
Silva
Access to Vaas
data Wickrama
Zoysa
is faster
12
Ensures uniqueness.
Search: Employee Dias A table with unique fields
in the index cannot have
two rows with the same
Index Opatha values in the column or
columns that form the
index key.
Costa Silva
13
Search: Employee Dias
. De Silva . Perera .
14
Relational Database
STORE INVENTORY STORE
Store Name | City Store Name | Part No | Quantity Store 1 | Colombo
Store 2 | Kandy
ORDERS
INVENTORY
Store Name | Part No | Vendor No | Order No | Quantity
Store 1 | P1 | 50
Store 1 | P3 | 20
PART VENDOR Store 2 | P2 | 100
Part No | Description Vendor No | Vendor Name Store 2 | P1 | 30
15