Working with SQL Server Database Objects - Managing Views

BookParadise is an online library management system used by a library in Seattle. The software makes use of SQL Server 2005 databases. Information about thousands of books are maintained and updated regularly. In the recent few years, BookParadise has grown in size after receiving international funding and the number of books has increased tremendously. | Working with SQL Server Database Objects Assignments Managing Views Sr. No. Assignment Question 1. BookParadise is an online library management system used by a library in Seattle. The software makes use of SQL Server 2005 databases. Information about thousands of books are maintained and updated regularly. In the recent few years BookParadise has grown in size after receiving international funding and the number of books has increased tremendously. This increase in the number of books has made searching for books very difficult. Also BookParadise needs to now allow searches to be made by users displaying only selective information to them. The entire content of the tables are not to be displayed to the users. Towards this end views will be created to enable the readers to display information about books in a fast and efficient manner. The Books table in the BookParadise database has the following structure Books Field Name Data Type Key Field Description BookCode varchar 5 Primary Key Book Identification Code Title varchar 30 Title of the book Author varchar 30 Author of the book Edition int Edition number RatePurchased money Cost price of the book PurchaseDate datetime Date when book was purchased VendorName varchar 30 Vendor who sold the book BookStatus varchar 15 Indicates whether book is available or not Table Books Table All the above fields except the primary key may accept null values. 1. Using SQL Server 2005 and Transact SQL statements create the above table in a database named BookParadise. Add at least seven records to the table. 2. Next create an indexed view named BookInfo on the table which will contain columns BookCode Title Author Edition and BookStatus. This view will need to check for domain integrity. Use appropriate options to ensure this. 3. Test the view by displaying information from it. Display all the records in the view. Also display the top 3 records in the view alphabetically sorted by the column Author. 4. Add three more records to

Bấm vào đây để xem trước nội dung
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.