Explain (or define) the following terms
persistent data
data that is not temporary. It is normally stored in the disk
query
a statement requesting the retrieval of information
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
atomic value
non divisible value
null
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가 된다.
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
Show that for any relations r(R) and s(S),
Using the above database, give a relational algebra expression for each of the following queries
Using again the above database, write SQL statements for the following queries