Skip to main content

Featured post

12 DevOps principles read today

DevOps means a concept to bring Development team and operation team together. So that you can speed up the deployment process. Before you start learning the tools you need to understand core principles.
The useful DevOps Principles to know for your project and interviewsTo deliver rapidly without affecting qualityCommunication and Collaboration are the key ideas in DevOps conceptMultiple deploys are possible- if code in Development team automatedOnce you commit the repository, it tests the code automatically against the automated test scriptsIf Build is successfully passed, it installs automatically in Testing environment When infrastructure is automated, it installs automatically to other serversMinor changes takes place in isolation, that means , it creates separate server to deploy minor changesSpeed in Devops, organizations to better serve their customers and compete more effectively in the market.Quality and Security teams are part of DevOpsAutomating the process, much better pro…

Story of SQL Views ideas you need when can be updated

A view can be read-only or updatable. You can maintain data security with views. Creating a view need base tables present in the database. Views are also called logical tables.

What is View

  • A view can be constructed with another view so it is called as nested view.
  • You can create or replace an existing view
  • A view can be created without having base tables. This is possible with FORCE option.

Read Only Views

The standard syntax for view is as follows:

CREATE OR replace VIEW invoice_summary AS
SELECT vendor_name count(*) AS invoice_count,
SUM(invoice_total) AS invoice_total_sum
FROM vendor
JOIN invoices
ON vendors.vendor_id*invoices.vendor_id
GROUP BY vendor_name;

Force Views

CREATE FORCE VIEW products_list
AS
SELECT product_description,
product_price
FROM products;

Updatable Views

  • A view can be updatable if a view follows certain rules.
  • A view when it is created for update purpose, you can give INSERT,UPDATE and DELETE operations.
  • A read only view should contain WITH READ ONLY CLAUSE.
  • While updating a view, it is possible to update only one base table at a time. When you created a view from more than one table, then it is not possible to update two tables at a time.

What is ALTER View

Using CREATE OR REPLACE statement you can ALTER the view already present.

Drop View

DROP VIEW vendors_sw

The view vendors_sw is deleted from database.

The Bottom Line

A view with CHECK OPTION is surely help you to satisfy certain condition. Usually this option will be used in updatable views.

Comments

Most Viewed

Hyperledger Fabric Real Interview Questions Read Today

I am practicing Hyperledger. This is one of the top listed blockchains. This architecture follows R3 Corda specifications. Sharing the interview questions with you that I have prepared for my interview.

Though Ethereum leads in the real-time applications. The latest Hyperledger version is now ready for production applications. It has now become stable for production applications.
The Hyperledger now backed by IBM. But, it is still an open source. These interview questions help you to read quickly. The below set of interview questions help you like a tutorial on Hyperledger fabric. Hyperledger Fabric Interview Questions1). What are Nodes?
In Hyperledger the communication entities are called Nodes.

2). What are the three different types of Nodes?
- Client Node
- Peer Node
- Order Node
The Client node initiates transactions. The peer node commits the transaction. The order node guarantees the delivery.

3). What is Channel?
A channel in Hyperledger is the subnet of the main blockchain. You c…