如何在SQL SERVER中为火车创建座位安排 [英] How can i create seat arrangement for a train in SQL SERVER

查看:93
本文介绍了如何在SQL SERVER中为火车创建座位安排的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为一个大学项目工作,我需要存储火车座位...(让我们说1-100特定火车)我怎么能在sql server中做到这一点。我应该创建一个所有火车的表并给出一个序列no.please帮助我。

I am working for a college project where i need to store train seat nos...(lets say its 1-100 for particular train)how can i do that in sql server.should i create a table of all the train and give a sequence no.please help me.

推荐答案

1)找出列车配置的要求:

ie。火车上有多少辆火车?一辆车有多少个座位?火车上可以有不同种类的汽车吗?

2)对数据建模,以便在您能想到的所有情景中保存数据。您还需要定义为每个座位保存所需的信息等等。

ie。表格(火车,汽车,火车车厢,CarSeats)

3)数据建模后,构建一个与用户交互的应用程序。



这些建议远未完成。它们就是为了让您了解如何将问题分解为更小,易于管理的组件,这些组件可以单独构建,然后组合在一起。想想开发就像玩乐高积木一样。你制作小组件,然后将多个小组件粘在一起,形成一个更大的组件。
1) Find out the requirements for train configurations:
ie. How many train cars in a train? How many seats in a car? Can there be different kinds of cars in a train?
2) Model your data to allow data to be saved in all scenarios that you can think of. You''ll need also to define the information you need to save for each seat, etc...
ie. Tables ( Train, Car, TrainCar, CarSeats )
3) After the data is modelled, build an application to interface with a user.

These suggestions are far from complete. They are just there to give you an idea of how to break the problem down into smaller, manageable components which can be built individually and then put together. Think of development like playing with lego blocks. You make small components and then stick multiple small components together to make a bigger component.


这篇关于如何在SQL SERVER中为火车创建座位安排的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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