Lab_02_AM10-13- - 7.104 DATABASE ENGINEERING I WEEK 02 AM10-13 LAB TUT SOLUTION SQL QUERY SELECT FROM WHERE Framework This laboratory tutorial

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

View Full Document Right Arrow Icon
7.104 DATABASE ENGINEERING I WEEK 02 – AM10-13 LAB / TUT SOLUTION SQL QUERY – SELECT / FROM / WHERE Framework 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 ITP Network System. It 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? - The three tables contain end-user data – student personal detail and his/her grade in each class or course undertook. Detail of the course is also kept - Each table has rows and columns - Each table has unique name: STUDENT, CLASS, GRADE - Each table column has unique name - No spaces in naming the tables and columns
Background image of page 1

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

View Full DocumentRight Arrow Icon
- Data in each column are of the same kind, eg Integers, Decimal and Characters - Data in some columns are repeated or same while the others are unique - No duplication in rows ie, no two rows are the same 2. How many columns and rows in the table STUDENT, CLASS, GRADE? - STUDENT (4 columns, 4 rows) - CLASS (4 columns, 5 rows) - GRADE (3 columns, 6 rows) 3. Which column or columns in each table is suitable to use as primary key? - STUDENT (StudentNumber, LastName, FirstName or EmailAddress) - CLASS(ClassNumber) - GRADE(StudentNumber and ClassNumber) 4. Which column or columns in each table is suitable to create relationship amongst those tables? StudentNumber and ClassNumber 5. Which table or tables contain foreign key? GRADE (B) Examine this table containing metadata and discuss questions follows
Background image of page 2
1. What can you tell from the content of the table USER_TABLE? The USER_TABLES contains metadata of the tables created by the users. That is, information on the structure of three tables (STUDENT, CLASS and GRADE): name of the tables and columns, type of data to be stored in each respective column, constraint to be enforced in each column 2. What is meant by the column StudentNumber has type Integer? The data to be stored in the column “StudentNumber” must be a number of type Integer.
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the 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 / 14

Lab_02_AM10-13- - 7.104 DATABASE ENGINEERING I WEEK 02 AM10-13 LAB TUT SOLUTION SQL QUERY SELECT FROM WHERE Framework This laboratory tutorial

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

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