2005년 중간1

  1. Explain (or define) the following terms

    1. persistent data

      data that is not temporary. It is normally stored in the disk

    2. query

      a statement requesting the retrieval of information

    3. DB & DBMS

      Database: an integrated collection of persistent data representing the information of interest

      DBMS: set of programs to manage/access data in the database

    4. atomic value

      non divisible value

    5. null

  2. Define super key, candidate key, and primary key

    Let K subset기호 R. K is a superkey of R if values for K are sufficient to identify a unique tuple of each possible relation r(R).

    K is a candidate key if K is minimal

    One of the candidate keys is selected to be primary key of the relation. 보통 그 relation을 가장 잘 대표할 만한 candiate key가 primary key가 된다.

  3. Define natural-join operation in terms of the fundamental (basic) operations

    For relational algebra:

    For SQL:

    Let r1(A1,…,Ak,C1,…,Cm) r2(B1,…,Bn,C1,…,Cm)

    select * from r1 natural join r2

    is equivalent to

    select A1, …, Ak, r1.C1,…,r1.Cm,.B1,..Bn from r1, r2 where r1.C1 = r2.C1 and …. and r1.Cm = r2.Cm

  4. Show that for any relations r(R) and s(S),

  5. Using the above database, give a relational algebra expression for each of the following queries

  6. Using again the above database, write SQL statements for the following queries

2004년 중간1

  1. Explain (or define) the following terms
  2. Define superkey, candidate key, and primary key in the ER model
  3. Answer the following questions about weak entity
  4. Interpret the relationship cardinality in the following ER diagram
  5. Draw an ER diagram of a database schema for each of the following requirements
  6. Express the following queries in relational algebra
  7. Express the following queries in relational calculus

2004년 중간2

  1. Explain (or define) the following terms
    1. referential integrity (foreign key constraint)
  2. _
  3. Consider the relational database below (primary keys are underlined). Give SQL statements for the following queries (you may use abbreviations for attribute names and constants.