Relational Database and mysql insight
-
Upload
mentallog -
Category
Technology
-
view
135 -
download
0
Transcript of Relational Database and mysql insight
![Page 1: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/1.jpg)
RELATIONAL DB AND MYSQL INSIGHT
![Page 2: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/2.jpg)
Outline
We have features for every step of the way
Relational DB
Database requirement
MySQL
![Page 3: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/3.jpg)
Relational database management system
1. Purpose2. Normalization
![Page 4: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/4.jpg)
● Wikipedia : A relational database management system (RDBMS) is a
database management system (DDMS) that is based on the relational
model as introduced by E. F. Codd, of IBM's San Jose Research
Laboratory. Many popular databases currently in use are based on the
relational database model.
● Relational database theory uses mathematical terminology, which
are roughly equivalent to that of Normalization:
RDBMS ~ NORMALIZATION
History
![Page 5: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/5.jpg)
NORMALIZATION
• Normalization was first proposed by Codd as an integral part of the relational model.
• It encompasses a set of procedures designed to eliminate nonsimple domains (non-atomic values) and the redundancy (duplication) of data, which in turn prevents data manipulation anomalies and loss of data integrity.
![Page 6: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/6.jpg)
NORMALIZATION PROCESS
![Page 7: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/7.jpg)
Normal Form
![Page 8: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/8.jpg)
Database Requirement
Stylize, edit, and animate your media
![Page 9: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/9.jpg)
Requirement?
• Much depends on the application However we can think of something like– In application level:
• Speed (performance)
• Availability
• Scalability
– In transaction level: • ACID (atomicity, consistency, isolation, durability)
– Something else?: • Compression , etc ….
![Page 10: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/10.jpg)
Just clarify the ACID
• Atomicity:– All or nothing– One part of the transaction fails (for failures, errors,
crashes), the entire transaction fails
• Consistency:– Bring database from a valid state to another
• Isolation:– The effect of an incomplete transaction might be or might
not be visible to another
• Durability:– The effect of a completed transaction must be stored
permanently.
![Page 11: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/11.jpg)
MYSQL
View your slides from anywhere!
![Page 12: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/12.jpg)
Logical architecture
![Page 13: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/13.jpg)
How does MySQL handle queries?
• Concurrency control– Locking (READ, WRITE)– Table lock and row lock
• Concurrency control– Locking (READ, WRITE)– Table lock and row lock
• Transaction– Isolation level (remember ACID?)
![Page 14: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/14.jpg)
Performance
• Depends on:– Table design
• Schema• Index
– Query• Some query beats all index• Query covered index
– Storage engine• Sometimes affect performance
much more than hard ware– Locking strategy– Etc, …
– Hardware• RAM (should be enough to store
index)• Hardrive, etc…
![Page 15: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/15.jpg)
Availability
![Page 16: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/16.jpg)
![Page 17: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/17.jpg)
![Page 18: Relational Database and mysql insight](https://reader033.fdocuments.us/reader033/viewer/2022042700/559488641a28ab077d8b45e8/html5/thumbnails/18.jpg)
GLHF