Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Description Following are examples and syntax of index: CREATE INDEX index _ name ON Table _ Name ( column name ) ; 1 . Create

Description Following are examples and syntax of index: CREATE INDEX index_name ON Table_Name(column name); 1. Create a nonclustered index for the column emp_on of the table employee . USE Company CREATE INDEX i_empno ON employee(emp_on)2. Create a unique nonclustered index on i_empName for the column Fname on the Employee table. USE Company CREATE UNIQUE INDEX i_empName ON Employee (Fname)3. Create a composite unique index i_empno_prno for the column emp_on and project_no on the works_on table . The compound values in both columns must be unique. Eighty percent of each index leaf page should be filled. USE Company CREATE UNIQUE INDEX i_empno_prno ON works_on(emp_on,project_no) IMAM ABDULRAHMAN BIN FAISAL UNIVERSITY Practical Session Plan College Department Course College of Computer Science and Information Technology Computer Information Systems Database Concepts and Design CIS 321 CIS 321 Lab manual 55| Page WITH FILLFACTOR=804. Create a clustered index for the column DNum of the table Project. USE Company CREATE INDEX i_DNum ON Project(Dnum ASC)5. Drop Index Syntax : DROP INDEX IndexName ON TableName; 6. Create a non-unique index for each foreign key . USE Company CREATE INDEX i_emp_deptno ON employee(dept_on) CREATE INDEX i_works_empno ON works_on(emp_on) CREATE INDEX i_works_prno ON works_on(project_on)7. Create a composite index that includes all the columns specified in the WHERE clause of the SELECT statement. SELECT * FROM works_on WHERE emp_no=29346 AND enter_date=1/4/1997 USE Company ; CREATE INDEX i_works ON works_on (emp_no,enter_date); IMAM ABDULRAHMAN BIN FAISAL UNIVERSITY Practical Session Plan College Department Course College of Computer Science and Information Technology Computer Information Systems Database Concepts and Design CIS 321 CIS 321 Lab manual 56| Page Tasks/Assignments(s)1. Create a nonclustered index for the Plocation column of the Project table. Sixty percent of each index leaf page should be filled. Index Name :i_Ploc. 2. Create a unique composite index for the DNumber and DName columns of the Department table. Index Name i_Dep 3. Create a clustered index for the DNO column of the Employee table. Index Name i_Dno 4. Delete index i_Dno from Employee table.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions