Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hi, I want the short answer to answer this question ( 3 lines ) , please 1- How to use a view in a database

hi, I want the short answer to answer this question ( 3 lines ) , please

1- How to use a view in a database to increase data security?

Simply put, VIEWS are virtual tables .By virtual, we mean, the tables do not store any data of their own but display data stored in other tables. In other words, VIEWS are nothing but SELECT Queries. syntax: CREATE VIEW `view_name` AS SELECT statement;

WHERE

"CREATE VIEW `view_name`" tells MySQL server to create a view object in the database named `view_name`

"AS SELECT statement" is the SQL statements to be packed in the views. It can be a SELECT statement can contain data from one table or multiple tables.

Views are virtual tables; they do not contain the data that is returned. The data is stored in the tables referenced in the SELECT statement.

Views improve security of the database by showing only intended data to authorized users. They hide sensitive data.

Views make life easy as you do not have write complex queries time and again.

It's possible to use INSERT, UPDATE and DELETE on a VIEW. These operations will change the underlying tables of the VIEW. The only consideration is that VIEW should contain all NOT NULL columns of the tables it references. Ideally, you should not use VIEWS for updating.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions