mirror of
https://github.com/robindhole/fundamentals.git
synced 2025-03-15 23:19:56 +00:00
Formatting fixes.
This commit is contained in:
parent
e0aa69b3b9
commit
7e3f1df597
@ -3,6 +3,7 @@
|
||||

|
||||
|
||||
## Agenda
|
||||
* Database Schema
|
||||
* Data Integrity
|
||||
* ER Diagrams
|
||||
|
||||
@ -75,9 +76,10 @@ INSERT INTO STUDENTS (id,name,age,phone,email,address,batch_id)
|
||||
VALUES (3,"John Watson",30,123456789,"i.am@sherlock.ed","221B Baker Street", 3);
|
||||
```
|
||||

|
||||
|
||||
As you can see, the database does not allow us to insert a duplicate row.
|
||||
|
||||

|
||||
<img src="https://i.kym-cdn.com/entries/icons/original/000/002/144/You_Shall_Not_Pass!_0-1_screenshot.jpg" alt="Gandalf" width="300"/>
|
||||
|
||||
### Referential integrity
|
||||
> Referential integrity is a property of data stating that all its references are valid.
|
||||
@ -190,6 +192,7 @@ erDiagram
|
||||
> A "one-to-one" relationship is seen when one instance of entity 1 is related to only one instance of entity 2 and vice-versa
|
||||
|
||||
A student can only have one email address and one email address can be associated with only one student.
|
||||
|
||||

|
||||
|
||||
An attribute shared by both entities can be added to either of the entities.
|
||||
|
Loading…
x
Reference in New Issue
Block a user