SQL help Essay

Submitted By David-Sandilands
Words: 7736
Pages: 31

SQL: Introduction

DH3J 34

Section 1: Create and maintain a data storage system © SQA Updated 2007

Developed by COLEG

SQL: Introduction

DH3J 34

Introduction to this section
What this section is about
In this section the students will learn the basic commands behind SQL and be able to create, insert and modify tables in a relational database.
Outcomes, aims and objectives
The aim of the section is to learn how to create and modify tables in a relational database and insert data into those tables.
At the end of this section you will be able to:


understand the data types available within an RDBMS



create and drop data tables in an RDBMS



insert data records into data tables



modify the structures of data tables



assign primary keys to tables.

Approximate study time
You should take approximately 10 hours to complete this section.
Other resources required
In order to participate in the unit, you will require individual access to a personal computer or workstation, which will include suitable RDBMS software. This unit has been written for the database system Oracle (from Oracle Corporation). However, your tutor may advise use of an alternative such as DB2 (from IBM).

© SQA Updated 2007

1

Developed by COLEG

SQL: Introduction

DH3J 34

Assessment information for this section
How you will be assessed
Assessment for this outcome will be in the form of practical assignments. Candidates must produce evidence to demonstrate their knowledge and/or skills by showing that they can use SQL to:


create a set of data tables using suitable data field types to meet specified requirements •

insert data records into data tables



modify a data table structure to meet specified requirements.

Evidence for this outcome will consist of the production of printouts listing the table structures and the table contents to meet the requirements of a specification.
The assessment should ensure that a range of data types is used and includes at least one example of each of the most common types of character, numeric and date.
This assessment is open book but must be undertaken in supervised conditions.
Assessors should assure themselves of the authenticity of each candidate’s submission. When and where you will be assessed
The section contains a number of SAQs and activities and you should attempt all of them. The tutor will facilitate the location and the time slots required to achieve a pass for all the outcomes of this unit.
What you have to achieve
At the end of this section you will have to achieve the following:


understanding of the data types available within an RDBMS



creating and dropping data tables in an RDBMS



inserting data records into data tables



modifying the structures of data tables



assigning primary keys to tables.

Opportunities for reassessment
Normally, you will be given one attempt to pass an assessment with one reassessment opportunity. Your centre will also have a policy covering ‘exceptional’ circumstances, for example if you have been ill for an extended period of time. Each case will be considered on an individual basis and is at your centre’s discretion (usually via written application), and they will decide whether or not to allow a third attempt. Please contact your tutor for details regarding how to apply.

© SQA Updated 2007

2

Developed by COLEG

SQL: Introduction

DH3J 34

Introduction to SQL
What is SQL or, to give it its full name, ‘structured query language’? To understand this we need to look into the history of databases over the past few decades.
A database is a collection of records stored on some media. Storage methods in the past included punch cards, paper tape, magnetic tapes and disks. Previously, different sections in a company would have their own copies of data. So, for example, there could be multiple copies of employee