SlideShare une entreprise Scribd logo
1  sur  12
Databases Peepaal - Preparing to Succeed
Normalization Why Normalize? Ideally, a relational database table should be designed in such a way as to exclude the possibility of update, insertion, and deletion anomalies. The normal forms of relational database theory provide guidelines for deciding whether a particular design will be vulnerable to such anomalies. It is possible to correct an unnormalized design so as to make it adhere to the demands of the normal forms: this is called normalization. A table that is not sufficiently normalized can suffer from  logical inconsistencies of various types, and from anomalies involving data operations causing Update, Insert and Delete Anomalies .
First/Second/Third Normal Form FIRST NORMAL FORM (1NF) A table with a unique key and without any nullable columns is in 1NF. SECOND NORMAL FORM(2NF) A 1 NF table with where every candidate key has only one attribute. THIRD NORMAL FORM(3NF) A 2 NF table where every non-prime attribute of the table must be non-transitively dependent on every candidate key
TRANSACTION MANAGEMENT ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ACID In computer science, ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that guarantee that database transactions are processed reliably. In the context of databases, a single logical operation on the data is called a transaction. Atomicity  - Atomicity refers to the ability of the DBMS to guarantee that either all of the tasks of a transaction are performed or none of them are. Consistency -  Consistency refers to the database being in a legal state when the transaction begins and when it ends. This means that a transaction cannot break the rules, or integrity constraints, of the database . Isolation  - Isolation refers to the ability of the application to  make operations in a transaction appear isolated from  all other operations Durability  -Durability ensures that the results of a completed  transaction are permanent and can survive future system and  media failures; that is, once they are done, they can not be  undone.
Concurrency  Control  Concurrency control in database management systems (DBMS) ensures that database transactions are performed concurrently without the concurrency violating the data integrity of a database. Concurrency Control •   Optimistic  - Delay the synchronization for a transaction until its end without blocking (read, write) operations, and then abort transactions that violate desired synchronization rules. •   Pessimistic  - Block operations of transaction that would cause  violation of synchronization rules.
Locks A Lock is a database system object associated with a database object (typically a data item) that prevents undesired (typically synchronization rule violating) operations of other transactions by blocking them. Database system operations check for lock existence, and halt when noticing a lock type that is intended to block them.Concurrency control in database management systems (DBMS) ensures that database transactions are performed concurrently without the concurrency violating the data integrity of a database.
Rollback & Rollforward Rollback Undoing the changes made by a transaction before it commits or to cancel any changes to a database made during the current transaction RollForward  Re-doing the changes made by a transaction after it commits or to overwrite the changed value again to ensure consistency
Database Design ,[object Object],[object Object],[object Object],[object Object],[object Object]
Logical/Physical design A  Logical Schema  is a data model of a specific problem domain that is in terms of a particular data management technology. Without being specific to a particular database management product, it is in terms of either relational tables and columns, object-oriented classes, or XML tags.  A  Physical Data Model  is a representation of a data design which takes into account the facilities and constraints of a given database management system. In the lifecycle of a project it is typically derived from a logical data model. A complete physical data model will include all the database artifacts required to create relationships between tables or achieve performance goals, such as indexes, constraint definitions, linking tables,  partitioned tables or clusters
Database Objects A  Database Trigger  is procedural code that is automatically executed in response to certain events on a particular table in a database. Triggers can restrict access to specific data, perform logging, or audit data modifications. A  Database View  is a virtual or logical table composed of the result set of a query. Unlike ordinary tables (base tables) in a relational database, a view is not part of the physical schema: it is a dynamic, virtual table computed or collated from data in the database. Changing the data in a table alters the data shown in the view In relational databases, SQL databases, and flat file databases, a  Table  is a set of data elements (values)  that is organized using a model of horizontal  rows and vertical columns.
In database packages, the term  Cursor  refers to a control structure for the successive traversal (and potential processing) of records in a result set. A  Transaction Log  (also database log or binary log) is a history of actions executed by a database management system to guarantee ACID properties over crashes or hardware failures. Physically, a log is a file of updates done to the database, stored in stable storage. A  Database Index  is a data structure that improves the speed of operations in a table. Indexes can be created using one or more columns, providing the basis for both rapid random lookups and efficient ordering of  access to records.  A  Stored Procedure  is a subroutine available to applications  accessing a relational database system. Stored procedures  (sometimes called a sproc or SP) are actually stored in the  database. Database Objects

Contenu connexe

Tendances

Data base management system
Data base management systemData base management system
Data base management system
Bibek Regmi
 
Lecture 02 architecture of dbms
Lecture 02 architecture of dbmsLecture 02 architecture of dbms
Lecture 02 architecture of dbms
rupalidhir
 
ANSI-SPARC - Star Trek style - v2.0
ANSI-SPARC - Star Trek style - v2.0ANSI-SPARC - Star Trek style - v2.0
ANSI-SPARC - Star Trek style - v2.0
Damian T. Gordon
 
Architecture of-dbms-and-data-independence
Architecture of-dbms-and-data-independenceArchitecture of-dbms-and-data-independence
Architecture of-dbms-and-data-independence
Anuj Modi
 
Physical database design(database)
Physical database design(database)Physical database design(database)
Physical database design(database)
welcometofacebook
 
Database management system presentation
Database management system presentationDatabase management system presentation
Database management system presentation
sameerraaj
 

Tendances (20)

Data base management system
Data base management systemData base management system
Data base management system
 
Structure of dbms
Structure of dbmsStructure of dbms
Structure of dbms
 
Transaction management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency control
 
Lecture 02 architecture of dbms
Lecture 02 architecture of dbmsLecture 02 architecture of dbms
Lecture 02 architecture of dbms
 
Distributed database management systems
Distributed database management systemsDistributed database management systems
Distributed database management systems
 
Slide 3 data abstraction & 3 schema
Slide 3 data abstraction & 3 schemaSlide 3 data abstraction & 3 schema
Slide 3 data abstraction & 3 schema
 
Database design (conceptual, logical and physical design) unit 2 part 2
Database design (conceptual, logical and physical design)  unit 2 part 2Database design (conceptual, logical and physical design)  unit 2 part 2
Database design (conceptual, logical and physical design) unit 2 part 2
 
ANSI-SPARC - Star Trek style - v2.0
ANSI-SPARC - Star Trek style - v2.0ANSI-SPARC - Star Trek style - v2.0
ANSI-SPARC - Star Trek style - v2.0
 
CBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL PresentationCBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL Presentation
 
Architecture of-dbms-and-data-independence
Architecture of-dbms-and-data-independenceArchitecture of-dbms-and-data-independence
Architecture of-dbms-and-data-independence
 
Structure of Database MAnagement System
Structure of Database MAnagement SystemStructure of Database MAnagement System
Structure of Database MAnagement System
 
Physical database design(database)
Physical database design(database)Physical database design(database)
Physical database design(database)
 
Chapter12 designing databases
Chapter12 designing databasesChapter12 designing databases
Chapter12 designing databases
 
Database basics
Database basicsDatabase basics
Database basics
 
Bank mangement system
Bank mangement systemBank mangement system
Bank mangement system
 
Database management system presentation
Database management system presentationDatabase management system presentation
Database management system presentation
 
Database abstraction
Database abstractionDatabase abstraction
Database abstraction
 
Data warehousing
Data warehousingData warehousing
Data warehousing
 
Database system-DBMS
Database system-DBMSDatabase system-DBMS
Database system-DBMS
 
Data models
Data modelsData models
Data models
 

En vedette (8)

PresentacióN1
PresentacióN1PresentacióN1
PresentacióN1
 
Calidad Editorial: Instrucciones a Autores y Protocolos
Calidad Editorial: Instrucciones a Autores y ProtocolosCalidad Editorial: Instrucciones a Autores y Protocolos
Calidad Editorial: Instrucciones a Autores y Protocolos
 
Fotos de la Naturaleza
Fotos de la NaturalezaFotos de la Naturaleza
Fotos de la Naturaleza
 
EASY800
EASY800EASY800
EASY800
 
Tabulacion De La Encuesta El Internet En La Vida Del Estudiante
Tabulacion De La Encuesta El Internet En La Vida Del EstudianteTabulacion De La Encuesta El Internet En La Vida Del Estudiante
Tabulacion De La Encuesta El Internet En La Vida Del Estudiante
 
Grecia Aristoteles
Grecia   AristotelesGrecia   Aristoteles
Grecia Aristoteles
 
Hiroshima And Nagasaki
Hiroshima And NagasakiHiroshima And Nagasaki
Hiroshima And Nagasaki
 
EASY800 Reloj Temporizador Semanal
EASY800  Reloj Temporizador SemanalEASY800  Reloj Temporizador Semanal
EASY800 Reloj Temporizador Semanal
 

Similaire à Database

Sql Interview Questions
Sql Interview QuestionsSql Interview Questions
Sql Interview Questions
arjundwh
 
Oracle Database Overview
Oracle Database OverviewOracle Database Overview
Oracle Database Overview
honglee71
 

Similaire à Database (20)

Data warehouse physical design
Data warehouse physical designData warehouse physical design
Data warehouse physical design
 
A Survey And Comparison Of Relational And Non-Relational Database
A Survey And Comparison Of Relational And Non-Relational DatabaseA Survey And Comparison Of Relational And Non-Relational Database
A Survey And Comparison Of Relational And Non-Relational Database
 
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
Oracle DBA Tutorial for Beginners -Oracle training institute in bangaloreOracle DBA Tutorial for Beginners -Oracle training institute in bangalore
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
 
Azure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full CourseAzure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full Course
 
Transaction Management
Transaction ManagementTransaction Management
Transaction Management
 
Rise of NewSQL
Rise of NewSQLRise of NewSQL
Rise of NewSQL
 
Introduction to Oracle Database
Introduction to Oracle DatabaseIntroduction to Oracle Database
Introduction to Oracle Database
 
Sql
SqlSql
Sql
 
Sql Interview Questions
Sql Interview QuestionsSql Interview Questions
Sql Interview Questions
 
Sql
SqlSql
Sql
 
Sql
SqlSql
Sql
 
153680 sqlinterview
153680  sqlinterview153680  sqlinterview
153680 sqlinterview
 
RDBMS to NoSQL. An overview.
RDBMS to NoSQL. An overview.RDBMS to NoSQL. An overview.
RDBMS to NoSQL. An overview.
 
Data Mining And Data Warehousing Laboratory File Manual
Data Mining And Data Warehousing Laboratory File ManualData Mining And Data Warehousing Laboratory File Manual
Data Mining And Data Warehousing Laboratory File Manual
 
Database Basics
Database BasicsDatabase Basics
Database Basics
 
Oracle Database Overview
Oracle Database OverviewOracle Database Overview
Oracle Database Overview
 
Introduction to Data Management
Introduction to Data ManagementIntroduction to Data Management
Introduction to Data Management
 
Data warehousing interview_questionsandanswers
Data warehousing interview_questionsandanswersData warehousing interview_questionsandanswers
Data warehousing interview_questionsandanswers
 
Introduction To Database.ppt
Introduction To Database.pptIntroduction To Database.ppt
Introduction To Database.ppt
 
11 Database Concepts
11 Database Concepts11 Database Concepts
11 Database Concepts
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Database

  • 1. Databases Peepaal - Preparing to Succeed
  • 2. Normalization Why Normalize? Ideally, a relational database table should be designed in such a way as to exclude the possibility of update, insertion, and deletion anomalies. The normal forms of relational database theory provide guidelines for deciding whether a particular design will be vulnerable to such anomalies. It is possible to correct an unnormalized design so as to make it adhere to the demands of the normal forms: this is called normalization. A table that is not sufficiently normalized can suffer from logical inconsistencies of various types, and from anomalies involving data operations causing Update, Insert and Delete Anomalies .
  • 3. First/Second/Third Normal Form FIRST NORMAL FORM (1NF) A table with a unique key and without any nullable columns is in 1NF. SECOND NORMAL FORM(2NF) A 1 NF table with where every candidate key has only one attribute. THIRD NORMAL FORM(3NF) A 2 NF table where every non-prime attribute of the table must be non-transitively dependent on every candidate key
  • 4.
  • 5. ACID In computer science, ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that guarantee that database transactions are processed reliably. In the context of databases, a single logical operation on the data is called a transaction. Atomicity - Atomicity refers to the ability of the DBMS to guarantee that either all of the tasks of a transaction are performed or none of them are. Consistency - Consistency refers to the database being in a legal state when the transaction begins and when it ends. This means that a transaction cannot break the rules, or integrity constraints, of the database . Isolation - Isolation refers to the ability of the application to make operations in a transaction appear isolated from all other operations Durability -Durability ensures that the results of a completed transaction are permanent and can survive future system and media failures; that is, once they are done, they can not be undone.
  • 6. Concurrency  Control Concurrency control in database management systems (DBMS) ensures that database transactions are performed concurrently without the concurrency violating the data integrity of a database. Concurrency Control •  Optimistic - Delay the synchronization for a transaction until its end without blocking (read, write) operations, and then abort transactions that violate desired synchronization rules. •  Pessimistic - Block operations of transaction that would cause violation of synchronization rules.
  • 7. Locks A Lock is a database system object associated with a database object (typically a data item) that prevents undesired (typically synchronization rule violating) operations of other transactions by blocking them. Database system operations check for lock existence, and halt when noticing a lock type that is intended to block them.Concurrency control in database management systems (DBMS) ensures that database transactions are performed concurrently without the concurrency violating the data integrity of a database.
  • 8. Rollback & Rollforward Rollback Undoing the changes made by a transaction before it commits or to cancel any changes to a database made during the current transaction RollForward  Re-doing the changes made by a transaction after it commits or to overwrite the changed value again to ensure consistency
  • 9.
  • 10. Logical/Physical design A Logical Schema is a data model of a specific problem domain that is in terms of a particular data management technology. Without being specific to a particular database management product, it is in terms of either relational tables and columns, object-oriented classes, or XML tags. A Physical Data Model is a representation of a data design which takes into account the facilities and constraints of a given database management system. In the lifecycle of a project it is typically derived from a logical data model. A complete physical data model will include all the database artifacts required to create relationships between tables or achieve performance goals, such as indexes, constraint definitions, linking tables, partitioned tables or clusters
  • 11. Database Objects A Database Trigger is procedural code that is automatically executed in response to certain events on a particular table in a database. Triggers can restrict access to specific data, perform logging, or audit data modifications. A Database View is a virtual or logical table composed of the result set of a query. Unlike ordinary tables (base tables) in a relational database, a view is not part of the physical schema: it is a dynamic, virtual table computed or collated from data in the database. Changing the data in a table alters the data shown in the view In relational databases, SQL databases, and flat file databases, a Table is a set of data elements (values) that is organized using a model of horizontal rows and vertical columns.
  • 12. In database packages, the term Cursor refers to a control structure for the successive traversal (and potential processing) of records in a result set. A Transaction Log (also database log or binary log) is a history of actions executed by a database management system to guarantee ACID properties over crashes or hardware failures. Physically, a log is a file of updates done to the database, stored in stable storage. A Database Index is a data structure that improves the speed of operations in a table. Indexes can be created using one or more columns, providing the basis for both rapid random lookups and efficient ordering of access to records. A Stored Procedure is a subroutine available to applications accessing a relational database system. Stored procedures (sometimes called a sproc or SP) are actually stored in the database. Database Objects