SlideShare uma empresa Scribd logo
1 de 25
Data Integrity Integrity without knowledge is weak and useless, and knowledge without integrity is dangerous Samuel Johnson, 1759
Management of organizational memories
Strategies for data integrity ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Strategies for data integrity ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Transaction processing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ACID Committed data are saved by the DBMS so that, in the event of a failure and system recovery, these data are available in their correct state Durability A transaction in process and not yet committed must remain isolated from any other transaction Isolation A transaction either creates a valid new database state, or, if any failure occurs, the transaction manager returns the database to its prior state Consistency If a transaction has two or more discrete pieces of information, either all of the pieces are committed or none are Atomicity
Concurrent update ,[object Object]
Concurrent update ,[object Object]
Concurrent update ,[object Object],[object Object],[object Object],[object Object],[object Object]
Database update process D a t a b a s e ( s t a t e 1 ) D a t a b a s e ( s t a t e 2 ) D a t a b a s e ( s t a t e 3 ) D a t a b a s e ( s t a t e 4 ) D a t a b a s e ( s t a t e 2 ) U p d a t e t r a n s a c t i o n A U p d a t e t r a n s a c t i o n B U p d a t e t r a n s a c t i o n C
Backup options Transaction log or journal Transactions that caused a change in the state of the database Before image log or journal After image log or journal Changes to the database Database backup Past states of the database (also known as database dumps) Dual recording of data (mirroring) Complete copy of database Action Objective
Transaction failure and recovery ,[object Object],[object Object],[object Object],[object Object]
Recovery strategies ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Data recovery * preferred strategy *Backward recovery Reprocess transactions (Excluding those from the update program that created incorrect data) Incorrect data detected (database has been incorrectly updated) *Backward recovery Forward recovery or reprocess transactions—bring forward to the state just before termination of the transaction Abnormal termination of an update transaction (transaction error or system failure) *Switch to duplicate database—this can be transparent with RAID  Forward recovery Reprocess transactions Storage medium destruction (database is unreadable) Recovery Procedures Problem
Transaction processing  recovery procedures ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Data quality ,[object Object],[object Object],[object Object],[object Object]
Data quality ,[object Object],[object Object],[object Object],[object Object],[object Object]
Integrity constraints Supplier number is unique. Indicating whether stored values for this data item must be unique (unique compared to other values of the item within the same table or record type). The unique option is also required for identifiers. UNIQUE Employee number is mandatory. Indicating whether the data item value is mandatory (not null) or optional. The not null option is required for primary keys. NOT NULL (MANDATORY) If item type is ‘Y’, then color is null. Providing one or more conditions to apply against data values. CONDITIONAL A delivery must have valid itemname, department, and supplier values before it can be added to the database. (Tables are checked for valid entries.) Providing a procedure to be invoked to validate data items. PROCEDURE Department phone number must be of the form 542-nnnn (stands for exactly four decimal digits). Providing a pattern of allowable characters which define permissible formats for data values. PATTERN Employee numbers must be in the range 1-100. Providing one or more ranges within which the data item must fall or must NOT fall. RANGE Item colors must match the list provided. Providing a list of acceptable values for a data item. VALUES Delivery number must be at least 3 digits and at most 5. Defining and validating the minimum and maximum size of a data item. SIZE Supplier number is numeric. Validating a data item value against a specified data type. TYPE Example Explanation Type of constraint
Integrity constraints Column  stkcode  must always be assigned a value of 3 or less alphanumeric characters.  stkcode  must be unique because it is a primary key. Column  natcode  must be assigned a value of 3 or less alphanumeric characters and must exist as the primary key of nation. Do not allow the deletion of a row in nation while there still exist rows in stock containing the corresponding value of  natcode . CREATE TABLE stock ( stkcode CHAR(3), … , natcode CHAR(3), PRIMARY KEY(stkcode), CONSTRAINT fk_stock_nation FOREIGN KEY (natcode) REFERENCES nation ON DELETE RESRICT); Explanation Example
A general model of data security
Authenticating mechanisms ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Authorization tables ,[object Object],None Supplier record Delete Brier None Sale record Modify Order processing program Type and color only Item record Modify Todd None Delivery record Read Production department If quantity ≥ 200 Delivery record Insert Purchase department supervisor If quantity < 200 Supplier record Insert Purchase department clerk None Supplier record Insert Accounting department Constraint Object Action Subject/Client
Encryption ,[object Object],[object Object],[object Object],[object Object],[object Object]
Public key encryption Decrypt Encrypt Receiver’s public key Receiver’s private key Sender Receiver
Signing ,[object Object],Verify Sign Sender’s private key Sender’s public key Sender Receiver

Mais conteúdo relacionado

Mais procurados

3 tier data warehouse
3 tier data warehouse3 tier data warehouse
3 tier data warehouseJ M
 
Advantages and disadvantages of relational databases
Advantages and disadvantages of relational databasesAdvantages and disadvantages of relational databases
Advantages and disadvantages of relational databasesSanthiNivas
 
Database security
Database securityDatabase security
Database securityCAS
 
Tableau Tutorial For Beginners | Tableau Training For Beginners | Tableau Cer...
Tableau Tutorial For Beginners | Tableau Training For Beginners | Tableau Cer...Tableau Tutorial For Beginners | Tableau Training For Beginners | Tableau Cer...
Tableau Tutorial For Beginners | Tableau Training For Beginners | Tableau Cer...Edureka!
 
Database Design Slide 1
Database Design Slide 1Database Design Slide 1
Database Design Slide 1ahfiki
 
Database administrator
Database administratorDatabase administrator
Database administratorTech_MX
 
Data warehouse and data mining
Data warehouse and data miningData warehouse and data mining
Data warehouse and data miningPradnya Saval
 
Data flow diagram
Data flow diagram Data flow diagram
Data flow diagram Nidhi Sharma
 
Structure of dbms
Structure of dbmsStructure of dbms
Structure of dbmsMegha yadav
 
File system.
File system.File system.
File system.elyza12
 
Database development life cycle unit 2 part 1
Database development life cycle  unit 2 part 1Database development life cycle  unit 2 part 1
Database development life cycle unit 2 part 1Ram Paliwal
 
Server configuration
Server configurationServer configuration
Server configurationAisha Talat
 
6. Integrity and Security in DBMS
6. Integrity and Security in DBMS6. Integrity and Security in DBMS
6. Integrity and Security in DBMSkoolkampus
 
Server Management
Server ManagementServer Management
Server ManagementDell World
 
Lecture 01 introduction to database
Lecture 01 introduction to databaseLecture 01 introduction to database
Lecture 01 introduction to databaseemailharmeet
 

Mais procurados (20)

3 tier data warehouse
3 tier data warehouse3 tier data warehouse
3 tier data warehouse
 
Iptables the Linux Firewall
Iptables the Linux Firewall Iptables the Linux Firewall
Iptables the Linux Firewall
 
Advantages and disadvantages of relational databases
Advantages and disadvantages of relational databasesAdvantages and disadvantages of relational databases
Advantages and disadvantages of relational databases
 
Database security
Database securityDatabase security
Database security
 
Tableau Tutorial For Beginners | Tableau Training For Beginners | Tableau Cer...
Tableau Tutorial For Beginners | Tableau Training For Beginners | Tableau Cer...Tableau Tutorial For Beginners | Tableau Training For Beginners | Tableau Cer...
Tableau Tutorial For Beginners | Tableau Training For Beginners | Tableau Cer...
 
Trigger
TriggerTrigger
Trigger
 
Database Design Slide 1
Database Design Slide 1Database Design Slide 1
Database Design Slide 1
 
Database administrator
Database administratorDatabase administrator
Database administrator
 
Data warehouse and data mining
Data warehouse and data miningData warehouse and data mining
Data warehouse and data mining
 
SQL(DDL & DML)
SQL(DDL & DML)SQL(DDL & DML)
SQL(DDL & DML)
 
Data flow diagram
Data flow diagram Data flow diagram
Data flow diagram
 
RDBMS concepts
RDBMS conceptsRDBMS concepts
RDBMS concepts
 
Structure of dbms
Structure of dbmsStructure of dbms
Structure of dbms
 
MYSQL.ppt
MYSQL.pptMYSQL.ppt
MYSQL.ppt
 
File system.
File system.File system.
File system.
 
Database development life cycle unit 2 part 1
Database development life cycle  unit 2 part 1Database development life cycle  unit 2 part 1
Database development life cycle unit 2 part 1
 
Server configuration
Server configurationServer configuration
Server configuration
 
6. Integrity and Security in DBMS
6. Integrity and Security in DBMS6. Integrity and Security in DBMS
6. Integrity and Security in DBMS
 
Server Management
Server ManagementServer Management
Server Management
 
Lecture 01 introduction to database
Lecture 01 introduction to databaseLecture 01 introduction to database
Lecture 01 introduction to database
 

Destaque

Destaque (11)

Topic 4 database recovery
Topic 4 database recoveryTopic 4 database recovery
Topic 4 database recovery
 
Data recovery
Data recoveryData recovery
Data recovery
 
Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recovery
 
Database security
Database securityDatabase security
Database security
 
Database recovery
Database recoveryDatabase recovery
Database recovery
 
Database Security
Database SecurityDatabase Security
Database Security
 
Dbms ppt
Dbms pptDbms ppt
Dbms ppt
 
DBMS
DBMSDBMS
DBMS
 
DbMs
DbMsDbMs
DbMs
 
Presentation on Database management system
Presentation on Database management systemPresentation on Database management system
Presentation on Database management system
 
Database management system
Database management systemDatabase management system
Database management system
 

Semelhante a Data integrity

Semelhante a Data integrity (20)

Dfd mechanics
Dfd mechanicsDfd mechanics
Dfd mechanics
 
Data Flow Diagram
Data Flow DiagramData Flow Diagram
Data Flow Diagram
 
SQL Server Stored procedures
SQL Server Stored proceduresSQL Server Stored procedures
SQL Server Stored procedures
 
It 302 computerized accounting (week 2) - sharifah
It 302   computerized accounting (week 2) - sharifahIt 302   computerized accounting (week 2) - sharifah
It 302 computerized accounting (week 2) - sharifah
 
inventory management system
 inventory management system inventory management system
inventory management system
 
Inventory management system
Inventory management systemInventory management system
Inventory management system
 
Extract, Transform and Load.pptx
Extract, Transform and Load.pptxExtract, Transform and Load.pptx
Extract, Transform and Load.pptx
 
Dfd mechanics
Dfd mechanicsDfd mechanics
Dfd mechanics
 
essentialofdatabasedesign-141203001046-conversion-gate01.pdf
essentialofdatabasedesign-141203001046-conversion-gate01.pdfessentialofdatabasedesign-141203001046-conversion-gate01.pdf
essentialofdatabasedesign-141203001046-conversion-gate01.pdf
 
Data quality and bi
Data quality and biData quality and bi
Data quality and bi
 
ETL_Methodology.pptx
ETL_Methodology.pptxETL_Methodology.pptx
ETL_Methodology.pptx
 
ETL Testing Training Presentation
ETL Testing Training PresentationETL Testing Training Presentation
ETL Testing Training Presentation
 
BIS06 Physical Database Models
BIS06 Physical Database ModelsBIS06 Physical Database Models
BIS06 Physical Database Models
 
BIS06 Physical Database Models
BIS06 Physical Database ModelsBIS06 Physical Database Models
BIS06 Physical Database Models
 
Ch10
Ch10Ch10
Ch10
 
New
NewNew
New
 
ICT-DBA-level4
ICT-DBA-level4ICT-DBA-level4
ICT-DBA-level4
 
MIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresMIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome Measures
 
[PHPUGPH] PHP Roadshow - MySQL
[PHPUGPH] PHP Roadshow - MySQL[PHPUGPH] PHP Roadshow - MySQL
[PHPUGPH] PHP Roadshow - MySQL
 
Final
FinalFinal
Final
 

Mais de Urooj Sabar

Mais de Urooj Sabar (6)

Five kingdom Classification
Five kingdom ClassificationFive kingdom Classification
Five kingdom Classification
 
Therapeutic cloning
Therapeutic cloningTherapeutic cloning
Therapeutic cloning
 
Biomart
BiomartBiomart
Biomart
 
Normalization
NormalizationNormalization
Normalization
 
Rna silencing
Rna silencingRna silencing
Rna silencing
 
Elisa
ElisaElisa
Elisa
 

Último

Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 

Último (20)

Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 

Data integrity

  • 1. Data Integrity Integrity without knowledge is weak and useless, and knowledge without integrity is dangerous Samuel Johnson, 1759
  • 3.
  • 4.
  • 5.
  • 6. ACID Committed data are saved by the DBMS so that, in the event of a failure and system recovery, these data are available in their correct state Durability A transaction in process and not yet committed must remain isolated from any other transaction Isolation A transaction either creates a valid new database state, or, if any failure occurs, the transaction manager returns the database to its prior state Consistency If a transaction has two or more discrete pieces of information, either all of the pieces are committed or none are Atomicity
  • 7.
  • 8.
  • 9.
  • 10. Database update process D a t a b a s e ( s t a t e 1 ) D a t a b a s e ( s t a t e 2 ) D a t a b a s e ( s t a t e 3 ) D a t a b a s e ( s t a t e 4 ) D a t a b a s e ( s t a t e 2 ) U p d a t e t r a n s a c t i o n A U p d a t e t r a n s a c t i o n B U p d a t e t r a n s a c t i o n C
  • 11. Backup options Transaction log or journal Transactions that caused a change in the state of the database Before image log or journal After image log or journal Changes to the database Database backup Past states of the database (also known as database dumps) Dual recording of data (mirroring) Complete copy of database Action Objective
  • 12.
  • 13.
  • 14. Data recovery * preferred strategy *Backward recovery Reprocess transactions (Excluding those from the update program that created incorrect data) Incorrect data detected (database has been incorrectly updated) *Backward recovery Forward recovery or reprocess transactions—bring forward to the state just before termination of the transaction Abnormal termination of an update transaction (transaction error or system failure) *Switch to duplicate database—this can be transparent with RAID Forward recovery Reprocess transactions Storage medium destruction (database is unreadable) Recovery Procedures Problem
  • 15.
  • 16.
  • 17.
  • 18. Integrity constraints Supplier number is unique. Indicating whether stored values for this data item must be unique (unique compared to other values of the item within the same table or record type). The unique option is also required for identifiers. UNIQUE Employee number is mandatory. Indicating whether the data item value is mandatory (not null) or optional. The not null option is required for primary keys. NOT NULL (MANDATORY) If item type is ‘Y’, then color is null. Providing one or more conditions to apply against data values. CONDITIONAL A delivery must have valid itemname, department, and supplier values before it can be added to the database. (Tables are checked for valid entries.) Providing a procedure to be invoked to validate data items. PROCEDURE Department phone number must be of the form 542-nnnn (stands for exactly four decimal digits). Providing a pattern of allowable characters which define permissible formats for data values. PATTERN Employee numbers must be in the range 1-100. Providing one or more ranges within which the data item must fall or must NOT fall. RANGE Item colors must match the list provided. Providing a list of acceptable values for a data item. VALUES Delivery number must be at least 3 digits and at most 5. Defining and validating the minimum and maximum size of a data item. SIZE Supplier number is numeric. Validating a data item value against a specified data type. TYPE Example Explanation Type of constraint
  • 19. Integrity constraints Column stkcode must always be assigned a value of 3 or less alphanumeric characters. stkcode must be unique because it is a primary key. Column natcode must be assigned a value of 3 or less alphanumeric characters and must exist as the primary key of nation. Do not allow the deletion of a row in nation while there still exist rows in stock containing the corresponding value of natcode . CREATE TABLE stock ( stkcode CHAR(3), … , natcode CHAR(3), PRIMARY KEY(stkcode), CONSTRAINT fk_stock_nation FOREIGN KEY (natcode) REFERENCES nation ON DELETE RESRICT); Explanation Example
  • 20. A general model of data security
  • 21.
  • 22.
  • 23.
  • 24. Public key encryption Decrypt Encrypt Receiver’s public key Receiver’s private key Sender Receiver
  • 25.