如何开始设计SQL表 [英] How to start design SQL tables

查看:79
本文介绍了如何开始设计SQL表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请问我如何设计SQL表,请给我一个如何开始的想法。我是技术新手。我需要紧急帮助

我需要设计这些表First Table 客户



Please How I can design SQL tables,Please give me Idea for that How to start.I am new on technology.please i need urgent help
I need to design these tables First TableCustomer

Unique Id	Mandatory
Name	Mandatory
First Name	Mandatory
Middle Name	Optional
Last Name	Optional
EmailId	Mandatory
Mobile#	Mandatory
Telephone#	Mandatory
Fax#	Optional
Credit Limit	Optional
Credit Days	Mandatory
Uadjusted Amount	Mandatory
IsActive	Mandatory
Bill Address	Optional
Ship Address	Optional
Total Balance	Mandatory
Contact Person Name	Mandatory
Opening Balance	Mandatory
Created DateTime	Mandatory
Modify DateTime	Mandatory
INACTIVE_DATE 	Optional





第二个表发票





Second table Invoice

Unique Id	Mandatory
Invoice#	Mandatory
Invoice Amount in Home Currency	Mandatory
Invoice Amount in Foreign Currency	Mandatory
Invoice Date	Mandatory
Due Date	Mandatory
Exchange Rate	Mandatory
CurrencyName	Mandatory
Balance Amount in Home Currency	Mandatory
Balance Amount in Foriegn Currency	Mandatory
Customer Id	Mandatory
CustomerName	Mandatory
Purchase Order#	Optional
Purchase Order Date	Optional
SalesPerson Name	Optional
Transaction Type	Mandatory
IsPaid	Optional
Created DateTime	Mandatory
Modify DateTime	Mandatory





第三表供应商





Third Table Vendor

Unique Id	Mandatory
Name	Mandatory
First Name	Mandatory
Middle Name	Optional
Last Name	Optional
EmailId	Mandatory
Mobile#	Mandatory
Telephone#	Mandatory
Fax#	Optional
Credit Limit	Optional
Credit Days	Mandatory
Uadjusted Amount	Mandatory
IsActive	Mandatory
Bill Address	Optional
Ship Address	Optional
Total Balance	Mandatory
Contact Person Name	Mandatory
Opening Balance	Mandatory
Created DateTime	Mandatory
Modify DateTime	Mandatory
INACTIVE_DATE 	Optional





第四个表帐单 < br $>




fourth table Bill

Unique Id	Mandatory
Bill#	Mandatory
Bill Amount in Home Currency	Mandatory
Bill Amount in Foreign Currency	Mandatory
Bill Date	Mandatory
Due Date	Mandatory
Exchange Rate	Mandatory
CurrencyName	Mandatory
Balance Amount in Home Currency	Mandatory
Balance Amount in Foriegn Currency	Mandatory
Vendor Id	Mandatory
Vendor Name	Mandatory
Purchase Order#	Optional
Purchase Order Date	Optional
SalesPerson Name	Optional
Transaction Type	Mandatory
IsPaid	Optional
Created DateTime	Mandatory
Modify DateTime	Mandatory





第五表收据





Fifth table Receipt

Unique ID	Mandatory
Receipt # or Adjustment Reference	Mandatory
Receipt Date	Mandatory
Invoice #	Mandatory
Invoice Date	Mandatory
Receipt Amount In Home Currency	Mandatory
Exchange Rate	Mandatory
Receipt Amount in Foreign Currency	Mandatory
Customer Id	Mandatory
Customer Name	Mandatory
Receipt Type	Mandatory
Created DateTime	Mandatory
Modify DateTime	Mandatory





我们需要这些表但是如上所述我看到有customerId和CustomerName是Invoice表和收据表的引用,与invoceNo,InvoiceDate相同。 .......所以我修好了我需要为此创建超过5张桌子吗?



任何人都可以给我一个合适的请注意这个想法。

因为我告诉我这项技术的新手。



我尝试过:



我还没有启动任何东西,我只需要一个想法,如果我为CustomerId,Customername创建一个表,并使主键用于参考其他表,,,和InvoiceNo和InvoiceDate一样........





请为此我需要您的紧急帮助。



we need these tables but as above i am seeing that there are customerId and CustomerName is references for Invoice table and receipt table same as for invoceNo, InvoiceDate,........so i am fix will I need to create more than 5 tables for that?

can anyone give me a suitable Idea for that please.
as i told I am new on this technology.

What I have tried:

I did not start anything yet, I need just an idea if i create a table for CustomerId, Customername and make primary key for taking references other table,,,same as for InvoiceNo and InvoiceDate and so........


please i need your urgent help for that.

推荐答案

呃......是的。您不会在任何论坛环境中获得有关如何执行此操作的完整教程。你真的需要学会以正确的方式做到这一点。我强烈建议你在SQL Server上学习一本初学者书并完成它。



为了做到这一点,这不是你要在一对夫妇身上学到的东西小时。
Uhhh...yeah. You're not going to get a full tutorial on how to do this in any forum environment. You really need to learn to do this the proper way. I highly suggest picking up a beginners book on SQL Server and working through it.

To do this properly, this is not something you're going to learn in a couple of hours.


你好,



你需要花一些时间来学习sql基础知识的第一件事。



请点击此链接如何在sql server中创建表格

[在sql server中创建表格]

要添加一个constrait,请关注直到part10视频,最多一个小时就不会花费太多时间。



以下是步骤:处理你的数据。

1)首先创建一个数据库。

2)添加具有标识和数据类型的表格。

3)添加约束映射表。

4)你没有提到数据类型(数字,varchar,日期时间,货币)检查你的团队。





谢谢

:)
Hi ,

The First Thing you need to spend some time to learn basics on sql.

please follow this link how to create a tables in sql server
[Create a tables in sql server]
To add a constrait please follow untill part10 videos and it won't take much time max one hour is enough.

Here are the steps to do with your data.
1) Create a database first.
2) Add Tables with Identity and data type.
3) Add constraints to mapping tables.
4) you didn't mentioned datatype(number,varchar,Datetime,Currency) check with your team.


Thanks
:)


这篇关于如何开始设计SQL表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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