Basics DB Flashcards
DBMS
DB + collection of programs to access DB
WHY DBMS?
Data redundancy and inconsistency, Difficulty in accessing data, Data isolation, Integrity problems, Atomicity, Concurrent access, Security problems
Data redundancy and inconsistency
With file system, same data stored at many places, if we change data at one place but not others, data becomes inconsistent.
Difficulty in accessing data
Due to the use of big programs.
Integrity constraint problems
Age cannot be negative
Atomicity
If one change made then all should follow otherwise rollback , not possible in FS
Concurrent access
Multiple people accessing same data
Security problems
Authorized access
View of data
Physical, logical, view
Logical level
Tables of DB, columns, etc.
View level
UI level
Physical level
Where data actually stored in disk
Committ
Save the changes made by transaction
Rollback
undo the changes done by transaction
Automatic rollback is
Atomicity
NULL
Representation of no value
DB Languages
DDL, DML
DDL
Creation/deletion of tables, adding/deleting cols., changing col. names
DML
Inserting/deleting/updating rows, Select
DB languages
Procedural and non procedural