Lab_02_AM10-13 - 7.104 DATABASE ENGI NEER I NG I WEEK 02...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 7.104 DATABASE ENGI NEER I NG I WEEK 02 – AM10-13 LAB / TUT SQL QUERY – SELECT / FROM / WHERE F ramework This laboratory / tutorial exercise aims for the student to understand and gain skills on how to develop and execute SQL Query to extract or retrieve information from the database system (MS SQL Server 2008) resided in I TP Network System. I t is recommended for students to follow the order as listed below; (A) Examine these three tables containing end-user data and discuss questions follows; 1. What can you tell from the name of those three tables? 2. How many columns and rows in the table STUDENT, CLASS, GRADE? 3. Which column or columns in each table is suitable to use as primary key? 4. Which column or columns in each table is suitable to create relationship amongst those tables? 5. Which table or tables contain foreign key? (B) Examine this table containing metadata and discuss questions follows 1. What can you tell from the content of the table USER_TABLE? 2. What is meant by the column StudentNumber has type Integer? 3. What is meant by the column LastName has constraint NOT NULL ? 4. Why the column StudentNumber and ClassNumber in the table GRADE has constraint Foreign Key ? 5. What is the primary key for the table GRADE? (C) Create SQL Query to ret rieve information from MS SQL Server 2008 Database System 1. Login into SQL Server 2008 using SQL Server Management Studio 2. Open New Query 3. Type these statements, check the syntax and clicks Execute USE DB_username; GO SELECT StudentNumber, LastName, FirstName FROM STUDENT; 4. Create SQL queries to meet these requirements 1. Give me a report for all students’ first name, last names and their student number 2. Give me a report for all class information 3. Give me a report for all grade information...
View Full Document

This note was uploaded on 04/03/2011 for the course ECON 7.104 taught by Professor Wei during the Spring '11 term at Faculty of English Commerce Ain Shams University.

Page1 / 15

Lab_02_AM10-13 - 7.104 DATABASE ENGI NEER I NG I WEEK 02...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online