- Database Testing Tutorial
- Database Testing - Home
- Database Testing – Overview
- Database Testing – Types
- Database Testing – Processes
- Database Testing – Techniques
- Database Testing – Scenarios
- Database Testing – Objects
- Database Testing – Data Integrity
- Database Testing – Data Mapping
- Database Testing – Performance
- Database Testing – Tools
- Database Testing – Backup
- Database Testing – Recovery
- Database Testing – Security
- Database Testing – Challenges
- DB Testing - Interview Questions
- Database Testing Useful Resources
- Database Testing - Quick Guide
- Database Testing - Useful Resources
- Database Testing - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Database Testing – Objects
Schemas, tables, stored procedures, and Triggers are key objects of a database. We have already shared DB testing types and test scenarios for these data base objects.
A database schema defines the structure of a database system in a format supported by the database management system. A Schema refers to how a database is structured (composed of database tables in the case of Relational Databases).
The database schema is a set of formulas called integrity constraints imposed on a database. These integrity constraints ensure compatibility between parts of the schema.
In a relational database, the schema consists of tables, fields, views, indexes, packages, procedures, functions, triggers, types, materialized views, synonyms, database links, and other elements.
Schemas are generally stored in a data dictionary. Although a schema is defined in text database language, the term is often used to refer to a graphical depiction of the database structure. In other words, schema is the structure of the database that defines the objects in the database.
Common type of Schemas used in a data warehouse are −
- Star Schema
- Snowflakes Schema
- Galaxy Schema
Tables in Database
In a relational database, a table is used to organize the information into rows and columns.
Example − A Customer table contains information such as customer id, addresses, phone numbers, and so on as a series of columns.
Each single piece of data is a field in the table. A column consists of all the entries in a single field, such as the telephone numbers of all the customers. Fields are organized as records, which are complete sets of information (such as the set of information about a particular customer), each of which comprises a row.
A stored procedure is a series of SQL statements stored in the database in a compiled form and multiple programs can share it. The use of stored procedures can be helpful in maintaining data integrity, data control access and improving productivity.
A database trigger is code that is executed in response to certain events on a particular table or view in a database. The trigger is mostly used for maintaining the integrity of the information on the database.