(1) Create a clustered index on the student number sno of the student table; (2) In...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
(1) Create a clustered index on the student number sno of the student table; (2) In the student table, create a non-clustered index for the name sname; (3) Create a unique index on the course number Cno of the curriculum; (4) Establish a composite index on the student number sno and grade grade of the course selection schedule, requiring the student number to be in ascending order, and the grade in descending order when the student number is the same; (5) Delete the index of the student table with drop; Analytical summary Lab 1 Database definition Purpose of the experiment 1. Master SQL data definition functions: database definition, table definition, index definition (optional) Experimental content 1. Create a school database (1) Student Form Column name illustrate SNO SNAME SGENDER SAGE SDEPT Student number CNO name GRADE age (2) Course Schedule Column name illustrate CNO CNAME CCREDIT Credits SEMSTER semester PERIOD Hours Department (3) Course Selection Table SC Column name illustrate SNO Course number Course name Student number Course number grades data type CHAR(7) CHAR(10) CHAR(2) SMALLINT VARCHAR(20) data type CHAR(10) VARCHAR(20) SMALLINT SMALLINT SMALLINT data type CHAR(7) CHAR(10) SMALLINT restraint Master code NOT NULL Take "female" The values are 15-45 Default Computer Department or restraint Master code NOT NULL Greater than 0 Greater than 0 Greater than 0 restraint The main code, which refers to the foreign code of Student The main code, which refers to the foreign code of Course Greater than 0 (1) Create a clustered index on the student number sno of the student table; (2) In the student table, create a non-clustered index for the name sname; (3) Create a unique index on the course number Cno of the curriculum; (4) Establish a composite index on the student number sno and grade grade of the course selection schedule, requiring the student number to be in ascending order, and the grade in descending order when the student number is the same; (5) Delete the index of the student table with drop; Analytical summary Lab 1 Database definition Purpose of the experiment 1. Master SQL data definition functions: database definition, table definition, index definition (optional) Experimental content 1. Create a school database (1) Student Form Column name illustrate SNO SNAME SGENDER SAGE SDEPT Student number CNO name GRADE age (2) Course Schedule Column name illustrate CNO CNAME CCREDIT Credits SEMSTER semester PERIOD Hours Department (3) Course Selection Table SC Column name illustrate SNO Course number Course name Student number Course number grades data type CHAR(7) CHAR(10) CHAR(2) SMALLINT VARCHAR(20) data type CHAR(10) VARCHAR(20) SMALLINT SMALLINT SMALLINT data type CHAR(7) CHAR(10) SMALLINT restraint Master code NOT NULL Take "female" The values are 15-45 Default Computer Department or restraint Master code NOT NULL Greater than 0 Greater than 0 Greater than 0 restraint The main code, which refers to the foreign code of Student The main code, which refers to the foreign code of Course Greater than 0
Expert Answer:
Answer rating: 100% (QA)
Code for Creating a school database with three tables Student Form Course Schedule and Course Select... View the full answer
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Posted Date:
Students also viewed these databases questions
-
The relation below concerns Invoice information. INVOICE (INV-No, INV-DATE, CUSTOMER-No, CUST-NAME, CUST-ADDRESS, SWPACK-ID, SWPACK-DESCR, UNIT-PRICE, SWPACK-QTY) For a given invoice (identified by...
-
In the following exercises, you will use the data in the TAL Distributors database shown in Figure 2-1 in Chapter 2. (If you use a computer to complete these exercises, use a copy of the original TAL...
-
(d) What is the value of "j" after the execution of the partial code in Figure 4.2? Explain your answer. int j = 10; for (int i = 0; 0; i
-
In a law firm consisting of 20 lawyers, 9 are criminal lawyers, 6 are divorce lawyers, and 4 are both criminal and divorce lawyers. If a lawyer from this firm is chosen at random, what is the...
-
In a home furnace humidification system, water droplets of diameter D are discharged in a direction opposing the motion of warm air emerging from the heater. The air is humidified by evaporation from...
-
Paula, an accountant at Kagan Industries, is considering buying a commercial building on the waterfront that will directly support the company's growth by appealing to its target clientele. Buildings...
-
You have collected the following data: If you randomly select one of these 10 numbers, what is the probability the number (X) will be ... a. equal to 4 ? b. equal to 7 ? c. less than 5 ? d. greater...
-
At December 31, 2014, the trial balance of Valcik Company contained the follow- ing amounts before adjustment. Instructions (a) Prepare the adjusting entry at December 31, 2014, to record bad debt...
-
How do advancements in technology and virtual collaboration platforms reshape traditional paradigms of delegation in contemporary work environments ?
-
Mercier Manufacturing produces a plastic part in three sequential departments: Extruding, Fabricating, and Packaging. Mercier uses the weighted-average process costing method to account for costs of...
-
Calculate the percentage change of the variable in each of the following cases. Then calculate the percentage change if the movement is occurring in the opposite direction, with what was the final...
-
In Problems 20-52: a. State the type; and \(\mathbf{b}\). Answer the question. Certain Concrete Company deposits \(\$ 4,000\) at the end of each quarter into an account paying \(10 \%\) interest...
-
If a car with a cash price of \(\$ 11,450\) is offered for nothing down with 48 monthly payments of \(\$ 353.04\), what is the APR?
-
Use a calculator to evaluate the amortization formula \[m=\frac{P\left(\frac{r}{n}ight)}{1-\left(1+\frac{r}{n}ight)^{-n t}}\] for the values of the variables \(P, r\), and \(t\) (respectively) given...
-
In Problems 20-52: a. State the type; and \(\mathbf{b}\). Answer the question. A 5-year term insurance policy has an annual premium of \(\$ 300\), and at the end of 5 years, all payments and interest...
-
Boats often relay messages by using flags. How many messages can be made using five flags out of a package of 40 different flags?
-
2) Which of the following file formats can be imported using Power Query? OXML Ocsv OHTML All of the above Next Question
-
The figure shows a bolted lap joint that uses SAE grade 8 bolts. The members are made of cold-drawn AISI 1040 steel. Find the safe tensile shear load F that can be applied to this connection if the...
-
Describe the purpose of the SUBTRACT command in relational algebra.
-
What additional factors must you consider during the physical-level design of a distributed database?
-
What is context-sensitive help?
-
Explain what happens when a B cell first encounters a pathogen and binds to an antigen on the pathogen.
-
Why is a single innate immune cell able to respond to many different pathogens?
-
What is an antigen?
Study smarter with the SolutionInn App