存储过程,触发 [英] stored procedure ,triggers

查看:170
本文介绍了存储过程,触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用SQL Server 2005在c#中使用ado.net进行项目汽车租赁系统.
我们必须在其中实现触发器,存储过程
请让我知道如何实现它们.
还可以给我一个关于我的界面外观的想法.
我正在发送案例研究.

I am doing a project car rental system with SQL Server 2005 using ado.net in c#.
We have to implement triggers ,stored procedures in that
Please let me know how to implement them.
Also can you give me an idea about my interface should look like.
I am sending my case study.

CAR HIRE RATING SYSTEM

Prepared By                Inspected/Reviewed By              Approved By 

NAME: Bhrahmagna Trivedi                 

SIGNATURE:                                

DATE:    16/ 10/2008                
                


VERSION HISTORY


Version No.	Date	Changed By	Changes Made
1.0	03/07/2008	Bhrahmagna Trivedi	Base Version 
			
			

Car Hire Rating System

1.	OBJECTIVES

The objective of this case study is to apply the learnt concepts and acquired skills. On completion of the case study participant should be able to:
•	Create the required tables in SQL Server.
•	Create stored procedures and triggers.
•	Generate unique Application Id using index or sequence.
•	Create web services.
•	Generate auto emails.

2.	PRE-REQUISITES

The participant should have 
1)	Knowledge of Normalization
2)	Working knowledge of creating tables, views, stored procedures with Transact-SQL
3)	Implementation Knowledge of SQL and Joins
4)	Familiarization with Visual studio
5)	Good knowledge of establishing connections with ADO.NET
6)	3-Tier implementation knowledge with web services

3.	SKILLS/CONCEPTS

Participant should be able to demonstrate Database design, Coding and Testing skills.
with SQL * Server, ASP.NET, ADO.NET and Web Services
Concepts – Normalization

4.	DURATION IN HOURS

This is an individual case study and the duration is 24 hours (3 days)

5.	SCENARIO
A travel & tour agency provides vehicles for hire.   They have a fleet of vehicles to offer for hire.  All of them are 4-wheelers with right hand drive. The vehicles are Vans and Cars.  The fuel required for them could be petrol and diesel too.  The agency has different rates for each type of vehicle.  The agency has vehicles fitted with ACs only.  The agency maintains ace drivers who could be touring guides too for the tourists.  The vehicles are well maintained by the agency so that they don’t break down during long distance travels.  They contain all types of spares, a mobile phone given to driver and even vehicle tracker equipment attached to them so that the vehicle is never left unguarded. An Operator of agency can book the car as per customer requirements and user can also book car online.

Registered User: Operator is registered user and can access the services provided by the agency and hire cars for customers.

	Unregistered Users: Those are customers who can hire car online.

Features:

•	The application should have login page in which the Operator/ User (customers) should login with the User Id provided by the agency website. 
•	In order to avail the services for hiring a car, provide a link for registration to the services in the Home Page.
•	The registration page should include following information: a) Customer Name b) Address c) Contact No. d) Email Id e) car f) place g) dateofhire. When user clicks the submit button a unique Application ID must be generated using index/sequence.
•	Automatic Email Generation should be done to requestors when a request is received.
•	Retrieve the information of available car for hiring.
•	Make a web service that returns the available car details for hiring.
•	Based upon the rate calculate the total amount and update the user’s information accordingly.

6.	RESOURCES(HARDWARE AND SOFTWARE)
Environment			: Net Framework, Visual Studio
Operating System		: Windows
Programming Language		: ASP.NET with C#/VB
Scripting Language		: Java Script
Database				: SQL Server

  
7.	DELIVERABLES
•	Website Accessed by 2 type of users
	Unregistered User(Customers)
	Registered User(Operator)
•	Auto mail should be generated.
•	The database containing tables has to be created.
•	Web service should make to get information about available cars.
8.	ASSUMPTION
The agency has a website and it takes vehicle requisitions through web, email, phone and even fax.  Web visitors search for tour plans, vehicle rents, their mileage rates along with vehicle types and register for one of them.

Vehicle type	Vehicle name	Fuel required	Seating capacity	Rent per day	Rate per km
Van	Scorpio	Diesel	7	1800	
Van	Tata Sumo	Diesel	7	1700	
Van	Toyota Qualis	Diesel	7	2000	
Car 	Esteem	Petrol	4	1750	
Car 	Honda City	Petrol	4	2500	
Car 	Hyundai Accent	Petrol	4	2100	

Tourist Destination	Distance from Hyderabad
Srisailam	240
Nagarjunasagar	180
Tirupathi	720



9.	COMMON MISTAKES

•	Giving incorrect data type and length while creating Table
•	Trying to create Table without mentioning the database and Table space name
•	Trying to insert data into table without Creating Unique index.
•	Problem in Connection String.
•	Not following the Coding standards.
•	SMTP port is not open for auto Email generation.

10.	CHECK LIST FOR DELIVERABLES

•	Refer to checklist for deliverables

11.	REFLECTION UPON LEARNING

•	Discussion on alternate solution provided by others.
•	Lessons learnt

12.	REFERENCES

•	PRO c#.net 3.5 by Matthew McDonalad.
•	Sql Server 2005 by Wrox publication.
•	ASP.NET 2.0 by Wrox publication.

推荐答案

首先在主题上搜索Google.

您现在应该已经熟悉了为您的作业研究主题.
Start by searching Google on the subject.

You should be familiar with researching your topics for your assignments by now.


这篇关于存储过程,触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆