Thursday, February 3, 2011

expected output assignment 3

he expected results of the SQL queries on the sample data is given below. Use these to check if your query is giving the correct output.

University Schema
  1. name
    ------------
    Srinivasan
    Katz
    Brandt
    (3 rows)

  2. course_id | title
    -----------+----------------------------
    CS-101 | Intro. to Computer Science
    CS-315 | Robotics
    CS-347 | Database System Concepts
    (3 rows)

  3. insert into teaches values ('10101', 'PHY-101', '1', 'Fall', '2009');

    id | name
    -------+------------
    10101 | Srinivasan
    (1 row)

  4. course_id
    -----------
    CS-101
    (1 row)

  5. name
    --------
    Kim
    Brandt
    (2 rows)

Railway Schema

  1. stcode1 | stcode2
    ---------+---------
    CST | BYC
    CST | DR
    CST | KRL
    BYC | DR
    BYC | KRL
    GRP | TNA
    (6 rows)

  2. id
    ------
    A65
    KP11
    (2 rows)

  3. name
    ---------------
    CST-KYN
    CST-AMR_LOCAL
    (2 rows)

  4. name
    -----------
    MUMBAI
    BYCULLA
    DADAR
    KURLA
    GHATKOPAR
    THANE
    DOMBIVALI
    KALYAN
    AMBARNATH
    (9 rows)

  5. name
    ---------------
    CST-AMR_LOCAL
    (1 row)


--
Rajwinder Singh
Head, Dept of Computer Science and Engineering
First Floor , Engineering Block I,
Chandigarh Engineering College, Landran (Mohali)-140307, Punjab, India
Phone : +91-0172-3984200 Ext  216
             +91-0172-3984216 (Direct)
             + 91-  9781925246 (Mobile)
Fax : +91-0172-3984207
E-Mail:cecm.cse@gmail.com
URL : www.cecmohali.org/cse.asp

Leave a Reply