Sie sind auf Seite 1von 9

1. What are the concerns at the physical design stage?

I/0 and storage devices, investigate what type of server to be used to hold the storage devices, how to import and export data, where to store the data, and how to enforce security measures on the database server 2. Explain why SQL is important to database development. Structured Query Language (SQL), which is used to create, control, and modify database objects. We use SQL to create and manage database objects, implement some security measures on those database objects, and import data into or export data from those database objects. The last part of this chapter is about copying and pasting databases. 3. What is the SQL extension used in SQL Server? DBO 4. What does DDL stand for? Data Definition language 5. What are the tasks that can be done by DDL? Used to manage databases, tables, attributes, and properties of a database. The most-often used DOL commands are: - CREATE: Used to create database objects such as tables, users, or views. - ALTER: Used to modify database objects. - DROP: Used to delete database objects. 6. What are the commonly used DDL commands? Create 7. What does DCL stand for? Data Control Language 8. What are the tasks that can be done by DCL? Data Control Language (DCL): Used to control permissions on database objects. The most common DCL commands are: - GRANT: Used to permit a user to use a database or execute some SQL commands. - REVOKE: Used to remove previously granted permissions. 9. What are the commonly used DCL commands? 10. What does DML stand for? Data Manipulation Languages 11. What are the tasks that can be done by DML? Data Manipulation Language (DML): Used to select, insert, update, and delete data in a database object. 12. What are the commonly used DML commands? The most often used DML commands are: - SELECT: Used to select information from a database. Columns are selected from database tables or views. - INSERT: Used to insert rows into database tables. - UPDATE: Used to modify rows in database tables. - DELETE: Used to delete rows in database tables.

13. Create a database named Computer_Shop with an initial size of 1 MB and a maximum size of 8 MB. The database file should be saved as Computer_Shop .mdf.

14. Create the table ORDER(Orderid, OrderDate, ShippingCharge, Total).

15. Write a SQL statement to create a table COMPUTER with the definition COMPUTER (Computerid, Maker, Model, Price).

16. Write a SQL statement to create a table with the following information: HARDDRIVE(SerialNumber, Maker, Model, Price)

17. Write a SQL statement to create a table with the following information: ORDER_HARDDRIVE(SerialNumber, Orderid)

18. Write a SQL statement to create a table with the following information:

ORDER_COMPUTER(Orderid, Computerid) 19. In Query Analyzer, alter the table HARDDRIVE by adding a new column Description with the CHAR ( 100) data type.
ALTER TABLE HARDRIVE ADD hdtype char(100)

20. Explain the meaning of Cascade Delete Related Records. Cascade Delete Related Records: When a key value in the parent table is deleted, automatically delete the matching values in the child table. 21. Use the INSERT statement to insert the following information into the

22. For the table HARDDRIVE, update the price for the hard drive with the serial number 12293 to $220.

23. Use the GRANT statement to grant the insert privilege to the public on table HARDDRIVE, and then use the REVOKE statement to remove the insert privilege to the public.

24. Insert the following data into the table ORDER created in Question 14:

Insert the following data into the table ORDER_HARDDRIVE created in

Insert the following data into the table ORDER_COMPUTER created in Question 18:

25. Create a table COMPUTER_NEW with the same structure as COMPUTER created in Question 15. Then export the data in COMPUTER to a text file.

Import the text file to the table COMPUTER_NEW.

Das könnte Ihnen auch gefallen