Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles by Bhanu Priya
Page 70 of 106
Explain the concept of magnetic disk with the help of a diagram(DBMS)
Magnetic disk is the secondary storage device used to support direct access to a desired location.Parts in Magnetic diskThe different parts that are present in magnetic disk or hard disk are explained below. All these parts are helpful to read, write and store the data in the hard disk.Disk blocks − The unit data transfer between disk and main memory is a block. A disk block is a contiguous sequence of bytes.Track − Blocks are arranged in concentric rings called tracks.Sectors − A sector is the smallest unit of information that can be read from or written to disk: for ...
Read MoreWhat is shadow paging in DBMS?
Shadow paging is one of the techniques that is used to recover from failure. We all know that recovery means to get back the information, which is lost. It helps to maintain database consistency in case of failure.Concept of shadow pagingNow let see the concept of shadow paging step by step −Step 1 − Page is a segment of memory. Page table is an index of pages. Each table entry points to a page on the disk.Step 2 − Two page tables are used during the life of a transaction: the current page table and the shadow page table. Shadow ...
Read MoreWrite a query to store and retrieve book information in the database (DBMS)?
Use the create command to create a table. Insert the values that are book information into the created database table using insert command.If we want to view or retrieve the inserted data use the select command.Step 1Create a book table in database as follows −The create command is used to create table, view, indexSyntaxThe syntax for the create command is as follows −Create table tablename(col1 datatype(size), col2 datatype(size), ……….colN datatype(size));ExampleUse the below mentioned command −create table book (bookname varchar(30), authorname varchar(30), noofcopies number(20));The output is the table created as shown below −BooknameAuthornamenoofcopiesStep 2Describe − The command used to describe the ...
Read MoreExplain the stages and their examples of database development lifecycle (DBMS)?
Let’s see the stages of database system life cycle (DDLC) and their facts using tabular form −Stage of Database system development LifecycleExample of FactsExample of Documentation ProducedDatabase PlanningAims and objectives of database projects.Mission statements and objectives.System IdentificationDescription of major user views (Job roles, business application areas).Definition of scope and boundary of database system, definition of user views to be supported.Requirements Collection and AnalysisRequirements of user views, system specifications, including performance and security requirements.User requirement specification, system specification.Database designUser’s responses to checking the logical database design, functionality provided by target DBMS.Logical database design, data dictionary, physical database design.Application DesignUsers’ response to ...
Read MoreWhat are the different phases of database development Life cycle (DBMS)?
The different phases of database development life cycle (DDLC) in the Database Management System (DBMS) are explained below −Requirement analysis.Database design.Evaluation and selection.Logical database design.Physical database design.Implementation.Data loading.Testing and performance tuning.Operation.Maintenance.Now, let us understand these phases one by one.Requirement AnalysisThe most important step in implementing a database system is to find out what is needed i.e what type of a database is required for the business organization, daily volume of data, how much data needs to be stored in the master files etc.In order to collect all this information, a database analyst spends a lot of time within the business ...
Read MoreWrite queries using aggregate functions in relational algebra (DBMS)?
The aggregate functions are follows −max()min()sum()average()count()Consider the following tables −Employee − Emp(empid, ename, salary)EmpidEmpnameSalaryE1Ravi4000E2Sanjay3500E3Sruthi3000E4Alok3000E5Pritam3000Dept − Dept(deptid, dname)DepidDnameD1CseD2EceD3CivilProject − Project(projected, pname)ProjectidPnameP1DatabaseP2networkingWorksin − Worksin(empid, depid)EmpidDepidE1P1E2P2E3P1E4P2E5P2Assign − Assign(empid, projectid)EmpidProjectidE1P1E2P2E3P1E4P2E5P2Example 1Display the details of the employee who works in the ece department.Step 1Use the below mentioned syntax. Here, T1= deptid of EceT1=∏deptid(σdname=ece(dept))OutputDeptidD2Step 2Here, ⋈= {T1.deptid=worksin.deptid} and T2= all empid of EceT2= ∏empid(T1⋈worksin)OutputEmpidE3E4Step 3Here, T3=(T2⋈emp), ⋈={T2.empid=emp.empid} and T3= details of all employees of EceEmpidEmpnameSalaryE3Smruthi3000E4Alok3000Example 2Display all names of employees who work on database projects.Step 1Use the command mentioned below −T1=∏projectid(σpname=database(project))OutputProjectidP1Step 2Use the command given below −T2= ∏empid(T1⋈assign)OutputEmpidE1E2Step 3Use the command given below −T3= ∏empname(T2⋈emp)OutputEmpnameRaviSmruti
Read MoreExplain cartesian product in relational algebra (DBMS)?
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 MoreWhat is an optimistic concurrency control in DBMS?
All data items are updated at the end of the transaction, at the end, if any data item is found inconsistent with respect to the value in, then the transaction is rolled back.Check for conflicts at the end of the transaction. No checking while the transaction is executing. Checks are all made at once, so low transaction execution overhead. Updates are not applied until end-transaction. They are applied to local copies in a transaction space.PhasesThe optimistic concurrency control has three phases, which are explained below −Read PhaseVarious data items are read and stored in temporary variables (local copies). All operations ...
Read MoreExplain about the Time stamp ordering protocol in DBMS
The timestamp-ordering protocol ensures serializability among transactions in their conflicting read and write operations. This is the responsibility of the protocol system that the conflicting pair of tasks should be executed according to the timestamp values of the transactions.A conflict occurs when an older transaction tries to read/write a value already read or written by a younger transaction. Read or write proceeds only if the last update on that data item was carried out by an older transaction.Otherwise, the transaction requesting read/write is restarted and gives a new timestamp. Here no locks are used so no deadlock.The timestamp of transaction ...
Read MoreExplain serial execution or transaction with an example(DBMS)
There are three possible ways in which a transaction can be executed. These are as follows −Serial execution − In serial execution, the second transaction can begin its execution only after the first transaction has completed. This is possible on a uniprocessor system.Parallel execution − In parallel execution, two transactions can start their execution at exactly the same instant of time. For this, we require more than one processor.Concurrent execution − In concurrent execution, execution of the second process can begin even before the process has completed its execution.Let us consider two transactions T1 and T2. In concurrent execution, the ...
Read More