Click here to Skip to main content
15,845,742 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
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

HTML
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

C#
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

HTML
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


fourth table Bill

C#
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

C#
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


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.
Posted
Updated 3-Aug-16 21:57pm
Comments
Suvendu Shekhar Giri 11-Jul-16 8:45am    
Better idea is to start with some tutorials first.

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.
 
Share this answer
 
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
:)
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900