Free Newsletters:
DatabaseDaily  
Database Journal
Search Database Journal:
 
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum DBA Videos
internet.com

» Database Journal Home
» DBA Videos
» Database Articles
» Database Tutorials
MS SQL
Oracle
MS Access
MySQL
DB2
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» DBA Jobs
» Sitemap

News Via RSS Feed



follow us on Twitter

Marketplace Partners
Be a Marketplace Partner

internet.commerce
Be a Commerce Partner


















Mariposa Bot Shipped With Vodafone Smartphone

IT Job Market Heating Up: Report

Bing Makes Strides But Momentum Stalls

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Database Journal | DBA Support | SQLCourse | SQLCourse2







Systems Engineer Sr - Solaris - Linux (TX)
Next Step Systems
US-TX-Houston

Justtechjobs.com Post A Job | Post A Resume

Featured Database Articles

SQL Etc

June 24, 2002

Introduction to Relational Databases

By Ian Gilfillan


Views are virtual tables. They do not contain any data themselves - rather they're a structure to allow us to access data, or a subset of the data. A view can consist of a subset of one table, such as in this example:

Poet
  • Code
  • First name
  • Surname
  • Age
  • Address
  • Telephone

This is the complete list of fields from the poet table

Subscriber view
  • Code
  • First_name
  • Surname
  • Grade

This view could be used to allow others to see the poet's code, name and surname, but not allow them access to personal information. Or, a view could be a combination of a number of tables, such as in this example

: Poet
  • Code
  • First name
  • Surname
  • Age
  • Address
  • Telephone

Poem
  • Poem code
  • Poet code
  • Title

Subscriber view
  • First_name
  • Surname
  • Poem title

Views are often used for security purposes. Junior developers may need access to certain portions of a table, but they do not need access to all the data. What they don't need, even if it is from the same table, is hidden and safe from manipulation or viewing. Also, views allow SQL queries to be much simpler. For example, without views, a developer may have to use the following query:

	
SELECT first_name,surname,poem FROM poet,poem
WHERE poem.poet_code=poet.code AND poet.title='Once';

With the view, a developer could do the same with:

SELECT first_name,surname,poem from subscriber_view;

Much more simple for a junior developer who hasn't yet learnt how to do joins across multiple tables, and less hassle for a senior developer too!

This has been a brief introduction to relational databases. Hopefully it's put some of the terms you've come across in context, and whetted your appetite to explore further.

Additional Resources:




Go to page: Prev  1  2  3  

Tools:
Add databasejournal.com to your favorites
Add databasejournal.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

SQL etc Archives








Latest Forum Threads
SQL etc Forum
Topic By Replies Updated
help with joining table and view stong 2 March 17th, 11:27 PM
return null when where has no result bugmenot1 0 March 15th, 06:17 AM
What does * mean tonyd 1 March 11th, 09:07 AM
Searching by time and grouping by numer padstar 4 February 22nd, 02:01 PM









The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers