Question

What SQL syntax would you use to change data in a table if you only had...

What SQL syntax would you use to change data in a table if you only had read access to the table? Having read access means the data manipulation would occur in the dataset rather than in the table being pulled from.

Homework Answers

Answer #1

Solution:

Sometimes the database administrator wants to restrict direct access to the database. For example, if a table contains various columns, but the user only needs 3 columns of data in such case DBA will create a virtual table of 3 columns. For both purposes, you can use the view. Views can act as a proxy or virtual table and we can do changes in that table. Views reduce the complexity of SQL queries and provide secure access to underlying tables.

View: Views are a special version of tables in SQL. They provide a virtual table environment for various complex operations. You can select data from multiple tables, or you can select specific data based on certain criteria in view. It does not hold the actual data; it holds only the definition of the view in the data dictionary.

The view is a query stored in the data dictionary, on which the user can query just like they do on tables. It does not use physical memory, only the query is stored in the data dictionary. It is computed dynamically, whenever the user performs any query on it. Changes made at any point in view are reflected in the actual base table.

The view has primarily two purposes:

  • Simplify the complex SQL queries.
  • Provide restrictions to users from accessing sensitive data.

Types of Views:

  • Simple View: A view based on only a single table, which doesn't contain GROUP BY clause and any functions.
  • Complex View: A view based on multiple tables, which contain GROUP BY clause and functions.

  • Inline View: A view based on a subquery in FROM Clause, that subquery creates a temporary table and simplifies the complex query.

  • Materialized View: A view that stores the definition as well as data. It creates replicas of data by storing it physically.

Advantages of views:

  • Views can be utilized as a subset of actual data to perform certain operations.
  • It helps us to provide an abstraction to various users or hide the complexity for users who are accessing data from the table.
  • It also simplifies data access from multiple joined tables. It can be used as aggregated tables using group by operations.
  • It does not hold any space because it only has the definition in the data dictionary, not the copy of actual data.

Disadvantages of view:

  • Views have a dependency on the table structure.
  • It has a dependency on base table structure dependency, computation time, and restrictions.

.....

Thanks!

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
What SQL syntax would you use to change data in a table if you only had...
What SQL syntax would you use to change data in a table if you only had read access to the table? Having read access means the data manipulation would occur in the dataset rather than in the table being pulled from.
Using SQL syntax, what statement would you use to create an Employee table with the information...
Using SQL syntax, what statement would you use to create an Employee table with the information FirstName, LastName, and EmployeeID.
What SQL syntax could you use to filter date ranges in your dataset?
What SQL syntax could you use to filter date ranges in your dataset?
A Guide to SQL Questions 1. How do you create a table using SQL? 2. How...
A Guide to SQL Questions 1. How do you create a table using SQL? 2. How do you delete a table using SQL? 3. What are the common data types used to define columns using SQL? 4. Identify the best data type to use to store the following data in Oracle, in SQL Server, and in Access:    a. The month, day, and year that an employee was hired    b. An employee’s Social Security number    c. The department...
SQL: Assume the table below was identified during a normalization activity. What command would I type...
SQL: Assume the table below was identified during a normalization activity. What command would I type to create this table -- assuming the 'TypeDesc' column was required? (i.e: not allowed to having missing values).   Assume that the possible Type Codes are H, C, W, M, P, S. (Don't worry about inserting the data. Make reasonable assumptions about the datatypes.) Table Name : Type TypCode TypeDesc H Home C Cell W Work M Mobile P Parent S Spouse
Lab 5 Queries with Multiple Tables In this lab, we do queries more than one table....
Lab 5 Queries with Multiple Tables In this lab, we do queries more than one table. SQL provides two different techniques for querying data from multiple tables: • The SQL subquery • The SQL join As you will learn, although both work with multiple tables, they are used for slightly different purposes. We used WMCRM database which is what we created in Lab 4. Here is the summary of the database schema (where schema is used in its meaning of...
If you had graph data (you have an image) how do you write it in a...
If you had graph data (you have an image) how do you write it in a program? I mean how do you represent it in a program? What structure would you use to write the graph? I mean how do you code it in a program for the computer to read the graph? A computer can’t read a drawing, so how do you code the program to read the graph? What structure would you use in a computer so the...
What critical value t* from the t-table would you use for a confidence interval for the...
What critical value t* from the t-table would you use for a confidence interval for the mean of the population in each of the following situations? NOTE: The critical value is just another name for the t* values we read off from the type of T Table you have in your notes. (Use 3 decimal places) (a) A 95% confidence interval based on 4 observations (b) A 99% confidence interval from an SRS of 9 observations (c) An 90% confidence...
would you use a frequency table or relative frequency table to generate data for patients seen...
would you use a frequency table or relative frequency table to generate data for patients seen in a doctors office and their wait time
What is one example where you would use grouping to summarize data In this example, if...
What is one example where you would use grouping to summarize data In this example, if you have any filtering criteria would you use the "Where" clause or the "Having" clause and why?
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT
Active Questions
  • The earth's magnetic field can affect the electron beam in an oscilloscope or a television tube....
    asked 9 minutes ago
  • The Huntington Boys and Girls Club is conducting a fundraiser by selling chili dinners to go....
    asked 18 minutes ago
  • 2. Please determinate the correctness of the following statements and justify your answers (preferably by examples)....
    asked 23 minutes ago
  • Explain the various methods of intelligence collection, specifically human intelligence and signals intelligence.
    asked 26 minutes ago
  • The provided file has syntax and/or logical errors. Determine the problem and fix the program. using...
    asked 29 minutes ago
  • What new items will you need to replace a failing processor? Select all that apply.   ...
    asked 48 minutes ago
  • A system is to be developed for an airport. When passengers have boarded an aircraft, a...
    asked 56 minutes ago
  • After reading Module 5 PowerPoint 1 - The Philosophy of Human Existance and Health Care Policy,...
    asked 1 hour ago
  • 1. Do you feel play has a place in supporting literacy development in early childhood? Explain...
    asked 1 hour ago
  • How should roles be selected for the Emergency Operations Center (EOC)?  Is seniority less important than experience?...
    asked 1 hour ago
  • Discuss routing issues and solutions namely, count-to-infinity, split horizon, split horizon with poison reverse, and hold-down...
    asked 1 hour ago
  • Find an optimal parenthesization of a matrix-chain product whose sequence of dimensions is〈5,10,3,12,5,50,6〉.
    asked 1 hour ago