Found 1669 Articles for Big Data Analytics

Write a query to store and retrieve book information in the database (DBMS)?

Bhanu Priya
Updated on 06-Jul-2021 15:55:45

700 Views

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 More

Explain schedules in 2PL with multiple granularities locking and schedules under tree(DBMS)

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

320 Views

Locking and unlocking of the database should be done in such a way that there is no inconsistency, deadlock and no starvation.2PL locking protocolEvery transaction will lock and unlock the data item in two different phases.Growing Phase − All the locks are issued in this phase. No locks are released, after all changes to data-items are committed and then the second phase (shrinking phase) starts.Shrinking phase − No locks are issued in this phase, all the changes to data-items are noted (stored) and then locks are released.Consider a tree structure database as follows −A -> B -> CLet us now ... Read More

Explain about two phase locking (2PL) protocol(DBMS)

Bhanu Priya
Updated on 07-Nov-2023 04:51:34

42K+ Views

Locking and unlocking of the database should be done in such a way that there is no inconsistency, deadlock, and no starvation.2PL locking protocolEvery transaction will lock and unlock the data item in two different phases.Growing Phase − All the locks are issued in this phase. No locks are released, after all changes to data-items are committed and then the second phase (shrinking phase) starts.Shrinking phase − No locks are issued in this phase, all the changes to data-items are noted (stored) and then locks are released.The 2PL locking protocol is represented diagrammatically as follows −In the growing phase transaction ... Read More

What is a materialized view in DBMS?

Bhanu Priya
Updated on 06-Jul-2021 14:55:32

6K+ Views

A materialized view is a view whose contents are computed and stored. Materialized view is also a logical virtual table, but in this case the result of the query is stored in the table or the disk. The performance of the materialized view is better than normal view since the data is stored in the disk.It's also called indexed views since the table created after the query is indexed and can be accessed faster and efficiently.ExampleConsider the view given below −Create view branchloan(branch-name, total-loan) as select branch-name , sum(amount) from loan groupby branch-name;Materializing the above view would be especially useful ... Read More

Explain the stages and their examples of database development lifecycle (DBMS)?

Bhanu Priya
Updated on 06-Jul-2021 15:52:54

562 Views

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 More

Check the view serializability for the given schedules(DBMS)

Bhanu Priya
Updated on 06-Jul-2021 14:54:59

2K+ Views

A schedule has view-serializability if it is viewed as equivalent to a serial schedule. A schedule is view serializable if the following three rules are satisfied −Rule 1 − If Ti reads data initially, after this Tj writes the same data, in the given schedule. This sequence must be followed in the transaction combination (read write operation).Rule 2 − If Ti writes data initially, after this Tj reads the same data, in the given schedule. This sequence must be followed in the transaction combination (write read operation).Rule 3 − If Ti writes data, after this Tj writes the data finally. ... Read More

What are the different phases of database development Life cycle (DBMS)?

Bhanu Priya
Updated on 06-Jul-2021 15:51:56

9K+ Views

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 More

How are locks used in DBMS?

Bhanu Priya
Updated on 06-Jul-2021 14:53:45

300 Views

In a transaction, a data item which we want to read or write should first be locked before any read or write operation. After the operation is over, the transaction unlocks the data item so that other transactions can lock that same data item for their use.ExampleLet us see how locking mechanisms help us to create error free schedules.An erroneous schedule is as follows −Here t2 reads A, before A is modified in T1. This will result in inconsistency.Now we use locking mechanism in the above schedule which is shown below −Until T1 performs Unlock(A) T2 cannot access A. So, ... Read More

When do we say the schedule is conflict equivalent(DBMS)?

Bhanu Priya
Updated on 06-Jul-2021 14:53:14

5K+ Views

Two schedules are said to be conflict equivalent if the order of any two conflicting operations are the same in both the schedules.Also, a concurrent schedule S is conflict equivalent to a serial schedule S’, if we can obtain S’ out of S by swapping the order of execution of non-conflicting instructions.Example 1Even if the schedule S1 keeps the database in the consistent state, we cannot convert it into a serial schedule and hence we conclude that the schedule is not conflict equivalent to any of the serial schedules.So, instead of considering only the read and write operation, we will ... Read More

Explain about conflict serializability in DBMS

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

11K+ Views

Conflict serializability orders any conflicting operations in the same way as some serial execution. A pair of operations is said to conflict if they operate on the same data item and one of them is a write operation.That meansReadi(x) readj(x) - non conflict   read-read operationReadi(x) writej(x) - conflict         read-write operation.Writei(x) readj(x) - conflic      t write-read operation.Writei(x) writej(x) - conflict      write-write operation.Where I and j denote two different transactions Ti and Tj.Precedence graphIt is used to check conflict serializability.The steps to check conflict serializability are as follows −For each transaction T, put ... Read More

Previous 1 ... 6 7 8 9 10 ... 167 Next
Advertisements