1 / 32

Software Training Institute - Testing Tools, Selenium, Full Stack Training in Hyderabad

MAGNITIA IT - Software Training Institute in Hyderabad & Bangalore. We offer IT Training for Class Room / Online Courses - Testing Tools, Selenium, DevOps, Full Stack, Python, AWS, Data Science and many more<br>

Magnitia
Download Presentation

Software Training Institute - Testing Tools, Selenium, Full Stack Training in Hyderabad

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  2. 1.What is Database Software? The software is used for doing DBMS/RDBMS activities is called database. RDBMS ( Relational Database Management System). Relationships between the database Objects. DBMS:- Ex: MS-Access, D-Base, FoxPro etc... RDBMS:- Ex: Oracle, MS-SQL Server, IBM DB2, MySQL (free source), Sybase, Teradata etc.... www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  3. 2.Types of SQL Commands? 1. DDL( Data Definition Language) Create, alter, drop, truncate, rename 2. DML ( Data Manipulation Language) insert, update, delete 3. DRL/DQL( Data Retrieval Language/Data Query Language) select 4. TCL ( Transaction Control Language) Commit, Rollback, save point. 5.DCL(Data Control Language) Grant, Revoke www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  4. 3.SQL query can start with below commands/words? Select : Get data from database tables. Update : Update data in a database table. Delete : Delete data from database table. Insert Into: Insert new data in a database table Crete Database : Creates a database. Alter Database : Modifies a database. Create Table : Create new table. Alter Table: Modifies a table. Drop Table : Delete’s a table. Create Index : Creates an index (search key). Drop Index : Deletes an index. www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  5. 4.How to use column in various data types? Varchar: - To store alpha numeric & special characters size from 0 to 65535 varchar [not default size]. Float: - To store number with decimal point size is float (x,4) X no: of digits before decimal point, Y no :of digits after decimal point. Bigint: - To store large number without decimal point. Double: - To store large no: of with decimal point. Int: - To store numbers without decimal point [20.5] no: of digits in number up to 255. Char: - To store alpha numeric & specific char size from 0+0.255, default size 15%. Date: - To store dates in yyyy-mm-dd size from 2002-01-10 to 2018-04-23. Data time: - To store data along with time format: yyyy-mm-dd to hh:mm:ss. Size: 2000-01-07 00:00:00 to 2001-02-04 23:37:59 www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  6. 5.Which constraints we can use while creating a database in SQL? Constraint can be used to specify the limit on the data type of table. Constraint can be specified while creating or altering the table statement. Sample of constraint are. Primary Key: - A combination of a not null & unique it is useful to uniquely identifies each row in a table. Foreign key: - Uniquely identifies a row in another table. Default: - Sets a default value for a column when no value is specified. INDEX: - Used to create & retrieve data from the database very quickly. Not Null: - Ensure that a column can’t have a null value. Unique: - Ensure that all values in a column are different. Check: - Ensure that all value in a column statistics a specific condition. www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  7. 6.Differences between Drop, Truncate & delete? • DROP: -- Drops the structure & data drop table table name; • TRUNCATE: -- Removes the all the rows permanently truncate table table name; • DELETE: -- Removes the all the rows temporarily. We can Roll back the rows. delete from table; www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  8. 7.Difference between Truncate Vs Delete queries? www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  9. 8.DefineUnion, Union all, Minus and Interact ? Displays all the records from multiple tables without duplicates. Select num from a union select num from b; Displays all the records from multiple tables including duplicates. Select num from a union all select num from b; Displays common records from multiple tables Select num from a intersect select num from b; Displays records which are not present in B Select num from a minus select num from b; Displays records from B which are note present in A Select num from b minus select num from a; www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  10. 9.What are different JOINS used in SQL? g www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  11. 10.What is Self Join? To join two tables, we need a common column in two tables as foreign key to join a table with it self, we need two columns with similar data in that table Select * from table1 innerjoin table1 on column1=column2; Above like quires result is equal to select distinct queries result. www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  12. 11.Types of Sub-queries? Sub-queries as scalar operand. Comparisons using sub-queries. Sub-queries with All, Any, In/Some. Row Sub-queries. Sub-queries with exists/not exists. Co-related Sub-queries. Sub-queries in the from clause. www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  13. 12.What are transactions and their controls? A transaction can be defined as the sequence task that is performed on databases in a logical manner to gain certain results. Operations performed like Creating, updating, deleting records in the database come from transactions. In simple words, we can say that a transaction means a group of SQL queries executed on database records. There are 4 transaction controls such as COMMIT: It is used to save all changes made through the transaction ROLLBACK: It is used to roll back the transaction such as all changes made by the transaction are reverted back and database remains as before SET TRANSACTION: Set the name of transaction SAVEPOINT: It is used to set the point from where the transaction is to be rolled back www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  14. 13.What is Transactions in SQL? SQL can provide TCL commands like commit & Rollback to handle transactions. While using this commands, we need to follow below rules: Rull1:-Off auto commit in My-SQL server because My-SQL server can auto commit transactions by default. Set autocommit=0; set autocommit=off;Rull 2:-We need to start transaction start transaction; Rull 3:- Perform required manipulations [insert, update, delete] Rull 4:-Do commit or Rollback for current transaction. www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  15. 14.Types of Functions in SQL? While preparing select queries, we can use various building functions in SQL. Aggregate Functions Comparison Functions String Functions Math Functions Date and Time Functions Control flow Functions Miscellaneous Functions www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  16. 15.What are Aggregate Functions? SQL Aggregate Functions calculates values from multiple columns in a table and returns a single value. AVG(), SUM(), MAX(), MIN(), MAX(), COUNT() SELECT AVG(SALARY) FROM EMPLOYEES; SELECT SUM(SALARY) FROM EMPLOYEES; SELECT MIN(SALARY) FROM EMPLOYEES; SELECT MAX(SALARY) FROM EMPLOYEES; SELECT COUNT(*) FROM EMPLOYEES; www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  17. 16.Permanent Table Vs Temporary table Vs Derived table? Permanent Table A table which is stored permanently database until drop is called as permanent table we can use below query. Create table tablename(column name datatype constraint, multiple columns……….); Temporary table SQL Languages can allow as creating temporary tables in database. A temporary table is created by using create temporary table statement. My-SQL removes the temporary table automatically when the session ands or the connection is terminated. Create temporary table table_name select * from original_table; Derived table SQL can allow as to create derived table. A derived table is a virtual table returned from a select statement. A derived is similar to a temporary query execution only where as temporary table can alive until session ends or the connection is terminated. Derived_table_name where derived table_name c1>0; www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  18. 17.What is the Primary key and Foreign keys?  Primary key A Primary key is a column whose values uniquely identify every row in a table. Primary key values can never be reused. Foreign keys When a one table’s primary key field is added to related tables in order to create the common field which relates the two tables, it called a foreign key in other tables. Foreign Key constraints enforce referential integrity. www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  19. 18.Explain Having & Order by clause in SQL? Having clause: Having clause is used to filter the output from the group by clause. Select department_id, sum(salary) from employees where department_id<>50 group by department_id; Select department_id, sum(salary) from employees group by department_id havingsum(salary)>20000; Order By clause: Order by clause is used to arrange the rows in a table (ascending or descending order). select * from employees order by department_id desc; select * from employees order by salary; www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  20. 19.What is Read lock? • Lock table tablename read; • Thesession that holds the read lock can only read data from the table but cannot and other sessions cannot write data to the table until the read lock is released. • If the session is terminated, either normally or abnormally. My-SQL will release all the locks implicitly. Select * from students; //available this query Insert/update/delete…..Not available www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  21. 20.What is Write lock? The only session that holds the lock of a table can read & write data from the table other sessions cannot read data from and write data to the table until the write lock is released. If the session is terminated, either normally or abnormally, My-SQL will release all the write locks implicitly. Select * from students; Insert/update/delete queries hold until write lock is released. www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  22. 21.What is the main difference between ‘BETWEEN’ and ‘IN’ condition operators? BETWEENoperator is used to display rows based on a range of values in a row whereas the IN condition operator is used to check for values contained in a specific set of values. Examples SELECT * FROM Students where ROLL_NO BETWEEN 10 AND 50; SELECT * FROM students where ROLL_NO IN (8,15,25); www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  23. 22.What is Auto Increment in SQL? Auto increment keyword allows the user to create a unique number to get generated whenever a new record is inserted into the table. This keyword is usually required whenever PRIMARY KEY is used. AUTO INCREMENT keyword can be used in Oracle and IDENTITY keyword can be used in SQL SERVER. www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  24. 23.Explain the types of Indexes? Single-column Indexes: A single-column index is created for only one column of a table. Syntax:CREATE INDEX index_nameON table_name(column_name); Composite-column Indexes: A composite-column index is an index created for two or more columns of the table. Syntax:CREATE INDEX index_name ON table_name (column1, column2) Unique Indexes: Unique indexes are used for maintaining the data integrity of the table. They don’t allow multiple values to be inserted into the table. Syntax: CREATE UNIQUE INDEX index ON table_name(column_name) www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  25. 24.What is Denormalization in a Database? Denormalization is used to access the data from higher or lower normal form of database. It also processes redundancy into a table by incorporating data from the related tables. Denormali-zation adds required redundant term into the tables so that we can avoid using complex joins and many other complex operations. Denormalization doesn?t mean that normalization will not be done, but the denormalization process takes place after the normalization process. www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  26. 25.What is the use of the Intersect operator? TheIntersect operator helps combine two select statements and returns only those records that are common to both the select statements. So, after we get Table A and Table B over here and if we apply the Intersect operator on these two tables, then we will get only those records that are common to the result of the select statements of these two. Syntax: SELECT column_list FROM table1 INTERSECT SELECT column_list FROM table2 www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  27. 26.How can you say that Database testing is different from that of GUI testing? GUI testing is always performed at the front end whereas the Database testing is performed at the back end When it comes to dealing with the testable items, generally the users prefer GUI testing. These items are present clearly./ On the other hand, the Database testing deals with the testable items that are hidden and are not directly visible to the users Structured Query Language largely matters in Database approach where the same doesn’t have any application with the GUI Invalidating the test boxes are a part of GUI database whereas the Database testing is totally different in this manner www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  28. 27.What do you mean by data-driven test? Data-driven testing is a term used in the testing process whereas test scripts while execution read test data and/or output values from data files (Data pools, Excel files, ADO objects, CSV files, ODBC sources) instead of reading the same hard-coded values each time. The test helps testers in checking the efficiency of the application in handling various inputs. www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  29. 28.What are the ACID properties? ACID properties refer to the four properties of transactions in SQL Atomicity–All the operations in the transaction are performed as a whole or not performed at all. Consistency – State of database changes only on successfully committed transactions. Isolation– Even with concurrent execution of the multiple transactions, the final state of the DB would be the same as if transactions got executed sequentially. In other words, each transaction is isolated from one another. Durability – Even in the state of crash or power loss the state of the committed transaction remains persistent. www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  30. 29.What is a View in SQL? A view is a virtual table, it is a named set of SQL statements that can be later referenced and used as a table. create view view_name as select column1, column2 from  table_name where condition; www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  31. 30.List some advantages and disadvantages of Stored Procedure? Advantages: A Stored Procedure can be used as a modular programming which means create once, store and call for several times whenever it is required. This supports faster execution. It also reduces network traffic and provides better security to the data. Disadvantage: The only disadvantage of Stored Procedure is that it can be executed only in the database and utilizes more memory in the database server. www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

  32. Thank you MAGNITIA IT 304 & 305, Paradigm SSS Square, Kothaguda X Roads, Opp to AMB Cinemas, Hyderabad - 500 081. +91 6309 16 16 16 www.magnitia.com FOLLOW US /magnitiaonline /magnitiaonline /magnitia /magnitia /magnitia www.magnitia.com | info@magnitia.com |+91 6309 16 16 16

More Related