Software Database and Testing

1,381 views

Published on

Published in: Education, Technology
1 Comment
2 Likes
Statistics
Notes
No Downloads
Views
Total views
1,381
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
85
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide

Software Database and Testing

  1. 1. WorkshopSoftware Databases&TestingLviv, 2013
  2. 2. Agenda items• Introduction to databases▫ Database models▫ Types of Keys in Database▫ Types of Table Relationships▫ Database Diagram• Structured Query Language▫ SQL Command Types▫ SQL Select Command Joining Tables• Database & Testing▫ Database Testing▫ Database migration testing▫ SQL Tuning or SQL Optimization
  3. 3. Database Models• Hierarchical Model• Network Model• Relational Model• Object/Relational Model• Object-Oriented Model• Semi structured Model• Associative Model• Entity-Attribute-Value (EAV) data model• Context Model
  4. 4. Types of Keys in Database• Primary key• Foreign key• Compound key
  5. 5. Types of Table RelationshipsA relationship works by matching data in key columns — usually columnswith the same name in both tables. In most cases, the relationship matchesthe primary key from one table, which provides a unique identifier for eachrow, with an entry in the foreign key in the other table.• One-to-Many Relationships• Many-to-Many Relationships• One-to-One Relationships
  6. 6. Structured Query LanguageSQL (Structured Query Language)A special purpose programming language designedfor managing data in relational database managementsystems (RDBMS).
  7. 7. SQL Command Types• Data Definition Language (DDL)• Data Manipulation Language (DML)• Data Control Language (DCL)• Transaction Control Language (TCL)
  8. 8. Data Definition LanguageData Definition Language (DDL) statements are used to define thedatabase structure or schema. Some examples:– CREATE - to create objects in the database– ALTER - alters the structure of the database– DROP - delete objects from the database– TRUNCATE - remove all records from a table, including allspaces allocated for the records are removed– COMMENT - add comments to the data dictionary– RENAME - rename an object
  9. 9. Data Manipulation LanguageData Manipulation Language (DML) statements are used formanaging data within schema objects. Some examples: SELECT - retrieve data from the a database INSERT - insert data into a table UPDATE - updates existing data within a table DELETE - deletes all records from a table, the space for therecords remain MERGE - UPSERT operation (insert or update) CALL - call a PL/SQL or Java subprogram EXPLAIN PLAN - explain access path to data LOCK TABLE - control concurrency
  10. 10. Data Control LanguageData Control Language (DCL) statements. Someexamples:– GRANT - gives users access privileges to database– REVOKE - withdraw access privileges given withthe GRANT command
  11. 11. Transaction Control LanguageTransaction Control Language (TCL) statements are used to managethe changes made by DML statements. It allows statements to begrouped together into logical transactions.– COMMIT - save work done– SAVEPOINT - identify a point in a transaction to which you canlater roll back– ROLLBACK - restore database to original since the lastCOMMIT– SET TRANSACTION - Change transaction options likeisolation level and what rollback segment to use
  12. 12. SQL SelectSELECT [ALL | DISTINCT] columnname1[,columnname2] FROM tablename1[,tablename2] [WHERE condition][ and|or condition...][GROUP BY column-list] [HAVING conditions][ORDER BY column-list [ASC | DESC] ]
  13. 13. Database & Testing• Database Testing• Database migration testing• SQL Tuning or SQL Optimization
  14. 14. Thank You all for attention! http://qagroup.com.ua/

×