منتدى مدرسة عزيز المصرى الإعدادية للبنين
مرحباً بك فى منتدى مدرسة عزيز المصرى الاعدادية
إدارة بندر كفر الدوار التعليمية

منتدى مدرسة عزيز المصرى الإعدادية للبنين



 
الرئيسيةالبوابةمكتبة الصوراليوميةس .و .جبحـثالتسجيلدخول

شاطر | 
 

 Test: Quiz: Primary Key, Foreign Key and Check Constraints

استعرض الموضوع السابق استعرض الموضوع التالي اذهب الى الأسفل 
كاتب الموضوعرسالة
وفاء السيد الابيض



عدد الرسائل : 344
تاريخ التسجيل : 21/03/2009

مُساهمةموضوع: Test: Quiz: Primary Key, Foreign Key and Check Constraints   السبت 02 يونيو 2012, 17:23


Test: Quiz: Primary Key, Foreign Key and Check Constraints

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.

Section 1
(Answer all questions in this section)

1. A Primary Key that is made up of more than one column is called a: Mark for Review
(1) Points


Multiple Primary Key


Composite Primary Key (*)


Double Key


Primary Multi-Key


None of the Above



Correct


2. The number of check constraints that can be defined on a column is: Mark for Review
(1) Points


10


5


100


There is no limit (*)



Correct


3. Foreign Key Constraints are also known as: Mark for Review
(1) Points


Parental Key Constraints


Child Key Constraints


Referential Integrity Constraints (*)


Multi-Table Constraints



Correct


4. A composite primary key may only be defined at the table level. True or False? Mark for Review
(1) Points


True (*)


False



Correct


5. The table that contains the Primary Key in a Foreign Key Constraint is known as: Mark for Review
(1) Points


Child Table


Parent Table (*)


Detail Table


Mother and Father Table



Correct


6. Which line of the following code will cause an error:
CREATE TABLE clients
(client_number NUMBER(4) CONSTRAINT client_client_num_pk PRIMARY KEY client_number),
first_name VARCHAR2(14),
last_name VARCHAR2(13),
hire_date DATE CONSTRAINT emp_min_hire_date CHECK (hire_date < SYSDATE),
department_id VARCHAR(3),
CONSTRAINT clients_dept_id_fk FOREIGN KEY(department_id) REFERENCES departments(department_id));
Mark for Review
(1) Points


Line 2 (*)


Line 3


Line 5


Line 7



Correct


7. If a Primary Key is made up of more than one column, one of the columns can be null. True or False? Mark for Review
(1) Points


True


False (*)



Correct


8. Which of the following pieces of code will NOT successfully create a foreign key in the CDS table that references the SONGS table Mark for Review
(1) Points


CONSTRAINT d_cd_ song_id_fk FOREIGN KEY (song_id)REFERENCES d_songs(id)


CONSTRAINT k_cd_songid_fk FOREIGN KEY (song_id)REFERENCES d_songs(id)


song_id NUMBER(5) CONSTRAINT d_cd_ song_id_fk REFERENCES d_songs(id)


None of the above (*)



Correct


9. The main reason that constraints are added to a table is: Mark for Review
(1) Points


Constraints add a level of complexity


Constraints ensure data integrity (*)


Constraints gives programmers job security


None of the Above



Correct


10. An example of adding a check constraint to limit the salary that an employee can earn is: Mark for Review
(1) Points


ALTER TABLE employees ADD CONSTRAINT emp_salary_ck SALARY < 100000


ALTER TABLE employees CONSTRAINT emp_salary_ck CHECK(salary < 100000)


MODIFY TABLE employees ADD CONSTRAINT emp_salary_ck CHECK(salary < 100000


ALTER TABLE employees ADD CONSTRAINT emp_salary_ck CHECK (salary < 100000) (*)



Incorrect. Refer to Section 10 Lesson 2.


11. The employees table contains a foreign key column department_id that references the id column in the departments table. Which of the following constraint modifiers will NOT allow the deletion of id values in the department table? Mark for Review
(1) Points


ON DELETE CASCADE


ON DELETE SET NULL


Neither A nor B (*)


Both A and B



Correct


12. To automatically delete rows in a child table when a parent record is deleted use: Mark for Review
(1) Points


ON DELETE SET NULL


ON DELETE ORPHAN


ON DELETE CASCADE (*)


None of the Above


الرجوع الى أعلى الصفحة اذهب الى الأسفل
 
Test: Quiz: Primary Key, Foreign Key and Check Constraints
استعرض الموضوع السابق استعرض الموضوع التالي الرجوع الى أعلى الصفحة 
صفحة 1 من اصل 1
 مواضيع مماثلة
-
» ESR Test
» CHI-SQUARE TEST كاي سكوير التعريف والخطوات مترجم من العربية إلي الإنجليزية
» Eleks Test
» Mathematics dictionary for primary 2
» lمعالجة مياه الشرب

صلاحيات هذا المنتدى:لاتستطيع الرد على المواضيع في هذا المنتدى
منتدى مدرسة عزيز المصرى الإعدادية للبنين :: منتديات المدرسة :: الحاسب الآلى-
انتقل الى: