Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Following are examples and syntax of index: 1. Create a nonclustered index for the column emp_on of the table employee. USE Company CREATE INDEX i_empno

image text in transcribed
image text in transcribed
Following are examples and syntax of index: 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) WITH FILLFACTOR =80 4. 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. USE Company CREATE INDEX i_works ON works_on (emp_no,enter_date) SELECT * FROM works_on WHERE emp_no=29346 AND enter_date=' 1/4/1997 ' 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 to Expert-Tailored 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

Question

What is the preferred personality?

Answered: 1 week ago

Question

What is the relationship between humans?

Answered: 1 week ago