Hi there, I am very new to this forum. I had a databases exam today in the university. I have a report of the questions and answers and answers I choose.Can you please help me check, if I choose the right answers,
Here are the questions:
Please select all correct sentences (may be just one).
1. With a single DataBase Management System (DBMS) we cannot create and maintain different databases.
2. We must define a unique Database Schema for each database.
3. We cannot store information until the Data Base Schema is defined.
Answer1=2;3;
Kommentare:
Frage 2 : "Basic Relational DM " [2 Punkte]
Please select all correct sentences (may be just one).
1: Each relation may have multiple primary key.
2: Each relation may have multiple candidate key.
3: Each relation has exactly one primary key.
Answer2=3;
Kommentare:
Frage 3 : "Data Updating and Normalization" [2 Punkte]
Consider the following example:
Please select all correct sentences (may be just one).
Unbenannt.JPG
1: This relation IS NOT in Third Normal Form (3NF).
2: This relation IS in Third Normal Form (3NF).
3: We need to know functional dependencies to give an answer.
4: We need to know all rows (tuples) of the relation to give an answer.
Answer3=1;4;
Kommentare:
Frage 4 : "Relational Algebra (1)" [2 Punkte]
Unbenannt.JPG
Please select a correct sentence.
For the Join operation:
1. The schema of the resultant relation does not depend on the schemas of the source relations.
2. The schema of the resultant relation is equal to the schema of the first source relation.
3. The schema of the resultant relation is an union of all domains defined in source relations.
Answer4=3;
Kommentare:
Frage 5 : "Relational Algebra (2)" [2 Punkte]
Unbenannt.JPG
Please select a correct sentence.
1: A resultant relation of the Join operation does not contain null values at all.
2: A resultant relation of the Join operation does not contain null values under common column(s).
3: A resultant relation of the Join operation may contain null values under any column.
Answer5=1;
Kommentare:
Frage 6 : "Relational Calculus (1)" [2 Punkte]
Unbenannt.JPG
Query: "Get names of such products which were sold to London".
C == Customer, T == Transaction, P == Product
(P.Pname): ???
Please select the omitted WFF ( ???)
1. T C (P.P# = T.P# And T.C# = C.C# And C.Ccity=London)
2. T P (P.P# = T.P# And T.C# = C.C# And C.Ccity=London)
3. T C (P.P# = T.P# And T.C# = C.C# And C.Ccity=London)
Answer6=2;
Frage 7 : "Relational Calculus (2)" [2 Punkte]
Unbenannt.JPG
Query: "Get names of such customers who bought the product number 1, or bought any product which costs more than 1000".
a == Cname, b == C#, c == P#, d == Price
get (a) : b c d ???
Please select the omitted WFF( ???)
1. (Customer(a,b) And Transaction(b,c) And c=1 Or Product(c,d) & d >1000)
2. (Customer(a,b) And Transaction(b,c) And ( c=1 Or Product(c,d) & d>1000))
3. (Customer(a,b) And (Transaction(b,c) And c=1 Or Product(c,d) & d>1000))
Answer7=2;
Kommentare:
Frage 8 : "Data Sub-Language SQL (1)" [4 Punkte]
Unbenannt.JPG
Please define an SQL Query: "Get names of products, dates and total price of such transactions which dealt with customers from London".
Select Pname, Date, Qnt*Price
From Transaction, Product
Where Transaction.C# In (Select C# From Customer Where Ccity = London)
Frage 9 : "Data Sub-Language SQL (2)" [1 Punkte]
Unbenannt.JPG
Query: "Find a total number of such customers who bought the Product 1 and a total number of such customers who bought the Product 2".
Please select a correct definition of the query
Select P#, COUNT(*) From Transaction
Where P#=1 Or P#=2 Group By P#
1.
Select P#, COUNT(*) From Customer Where C# In
(Select C# From Transaction Where P#=1 OR P#=2)
Group By P#
2.
Select P#, COUNT(C#) From Transaction
Where P#=1 Or P#=2
3.
Answer9=2;
Kommentare:
Frage 10 : "Data Sub-Language QBE" [1 Punkte]
Unbenannt.JPG
Query: "Get names of all customers in London or Paris".
Please select the omitted example element( ?)
1. P.Y
2. P.X
3. X
Answer10=1;
Kommentare:
Sorry for my bad englisch.
I hope for an answer.