Lab_02_AM10-13 - Solution

# Lab_02_AM10-13 - Solution - 7.104 DATABASE ENGINEERING I...

This preview shows pages 1–3. Sign up to view the full content.

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

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

View Full Document
- 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?
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern