Found 428 Articles for DBMS

Explain rename operation in relational algebra (DBMS)?

Bhanu Priya
Updated on 06-Jul-2021 15:40:40

10K+ Views

Query is a question or requesting information. Query language is a language which is used to retrieve information from a database.Query language is divided into two types −Procedural languageNon-procedural languageProcedural languageInformation is retrieved from the database by specifying the sequence of operations to be performed.For Example − Relational algebra.Structure Query language (SQL) is based on relational algebra.Relational algebra consists of a set of operations that take one or two relations as an input and produces a new relation as output.Types of Relational Algebra operationsThe different types of relational algebra operations are as follows −Select operationProject operationRename operationUnion operationIntersection operationDifference operationCartesian ... Read More

Explain project operation in relational algebra (DBMS)?

Bhanu Priya
Updated on 06-Jul-2021 15:39:13

9K+ Views

Query is a question or requesting information. Query language is a language which is used to retrieve information from a database.Query language is divided into two types −Procedural languageNon-procedural languageProcedural languageInformation is retrieved from the database by specifying the sequence of operations to be performed.For Example − Relational algebra.Structure Query language (SQL) is based on relational algebra.Relational algebra consists of a set of operations that take one or two relations as an input and produces a new relation as output.Types of Relational Algebra operationsThe different types of relational algebra operations are as follows −Select operationProject operationRename operationUnion operationIntersection operationDifference operationCartesian ... Read More

Explain the select operation in relational algebra (DBMS)?

Bhanu Priya
Updated on 06-Jul-2021 15:04:12

7K+ Views

Query is a question or requesting information. Query language is a language which is used to retrieve information from a database.Query language is divided into two types −Procedural languageNon-procedural languageProcedural languageInformation is retrieved from the database by specifying the sequence of operations to be performed.For Example − Relational algebra.Structure Query language (SQL) is based on relational algebra.Relational algebra consists of a set of operations that take one or two relations as an input and produces a new relation as output.Types of Relational Algebra operationsThe different types of relational algebra operations are as follows −Select operationProject operationRename operationUnion operationIntersection operationDifference operationCartesian ... Read More

Explain the relational algebra in DBMS?

Bhanu Priya
Updated on 06-Jul-2021 15:06:17

1K+ Views

Query is a question or requesting information. Query language is a language which is used to retrieve information from a database.Relational algebraIt is a procedural query language. It gives a step-by-step process to obtain the result of the query. It uses operators to perform queries.Relational algebra can be depicted as follows −Algebraic OperationsThe different algebraic operations in the DBMS are as follows −Let us understand the relational algebra operations in DBMS.Select operationIt displays the records that satisfy a condition. It is denoted by sigma (σ). It is a horizontal subset of the original relation.Syntaxσcondition(table name)Projection operationIt displays the specific column ... Read More

What is a query language in DBMS?

Bhanu Priya
Updated on 06-Jul-2021 14:01:02

11K+ Views

Query is a question or requesting information. Query language is a language which is used to retrieve information from a database.Query language is divided into two types as follows −Procedural languageNon-procedural languageProcedural languageInformation is retrieved from the database by specifying the sequence of operations to be performed.For Example: Relational algebraStructure Query language (SQL) is based on relational algebra.Relational algebra consists of a set of operations that take one or two relations as an input and produces a new relation as output.The different types of relational algebra operations are −Select operationProject operationRename operationUnion operationIntersection operationDifference operationCartesian product operationJoin operationDivision operation.Select, project, ... Read More

Explain the design constraints on the generalization and specialization (DBMS)?

Bhanu Priya
Updated on 06-Jul-2021 14:00:08

6K+ Views

The different types which we need to consider while designing generalization and specialization in the Database Management System (DBMS) are as follows −Conditional definitionAttribute definedUser definedDisjoint definedOverlapping constraintCompleteness constraintLet us now understand them one by one.Conditional definitionCreate one database, and keep conditions on one attribute for example attendance. This type of constraint is defined on a single attribute which is further dividing an entity into two sub entity sets which will give information for the given attribute.ExampleGiven below is an example of the conditional definition database −Attribute definedThis refers to specifying conditions on more than one attribute.ExampleConsider a database for ... Read More

What is an expression tree in DBMS?

Bhanu Priya
Updated on 06-Jul-2021 14:39:50

651 Views

Expression tree is also called a query tree. It demonstrates an evaluation plan.ExampleConsider an evaluation plan for the given query −Select name from customer, account where customer.name=account.name and account.balance>2000;There are two evaluation plans −Πcustomer.name(σcustomer.name=account.name^ account.balance>2000(customerXaccount)Πcustomer.name(σcustomer.name=account.name(customerXσ account.balance>2000(account)The expression trees for the above evaluation plans are as follows −Cost evaluator evaluates the cost of different evaluation plans and chooses the evaluation plan with lowest cost. Disk access time, CPU time, number of operations, number of tuples, size of tuples are considered for cost calculations.Read More

What is query optimization and explain its two forms(DBMS)?

Bhanu Priya
Updated on 06-Jul-2021 13:27:55

5K+ Views

For any given query, there may be a number of different ways to execute it. The process of choosing a suitable one for processing a query is known as query optimization.FormsThe two forms of query optimization are as follows −Heuristic optimization − Here the query execution is refined based on heuristic rules for reordering the individual operations.Cost based optimization − the overall cost of executing the query is systematically reduced by estimating the costs of executing several different execution plans.ExampleSelect name from customer, account where customer.name=account.name and account.balance>2000;There are two evaluation plans −Πcustomer.name(σcustomer.name=account.name ^ account.balance>2000(customerXaccount)Πcustomer.name(σcustomer.name=account.name(customerXσ account.balance>2000(account)Cost evaluator evaluates the cost ... Read More

What is query processing and optimization in DBMS?

Bhanu Priya
Updated on 06-Jul-2021 13:27:25

18K+ Views

The activities involved in parsing, validating, execution and optimizing a query is called Query Processing.StepsThe steps involved in query processing and optimization are as follows −A sequence of primitive operations that can be used to evaluate a query is called query execution plan or query evaluation plan.The query execution engine takes a query evaluation plan, executes that plan and produces the desired output. The different execution plans for a given query can have different costs based on the number of disks. It is the responsibility of the system to construct a query evaluation plan which minimizes the cost of query ... Read More

Explain join operations with the help of an example in DBMS

Bhanu Priya
Updated on 06-Jul-2021 13:09:54

4K+ Views

Join operation combines two relations with respect to a condition, It is denoted by ⋈. Joins are of different types, Theta join, Natural join, Outer join (Left outer join, Right outer join, Full outer Join).ExampleConsider an example as given below −Step 1Querycreate a table student (name char(30), regno number(10));OutputTable created.Step 2Queryinsert into student values (‘hari’, 1); Insert into student values (‘subbu’, 2); Insert into student values (‘srinu’, 3);Output3 rows created.Step 3Queryselect * from student;OutputNameRegnoHari1Subbu2Srinu3Step 4QueryCreate table marks(regno number(10), total number(10));Outputtable created.Step 5Queryinsert into marks values (1, 400); Insert into marks values(2, 450); Insert into marks values (3, 300);Output3 rows created.Step ... Read More

Advertisements