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

Info icon This preview shows pages 1–3. 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
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern