Click here to Skip to main content
14,298,693 members
Rate this:
Please Sign up or sign in to vote.
See more:
The design of web form

Things quantity descriptions

Check- textbox textbox
Box

What I have tried:

I tried to create two different table like different table for checkbox and different for two textbox
Posted
Updated 7-Sep-19 23:10pm
v2
Rate this:
Please Sign up or sign in to vote.

Solution 1

Here is an SQL Server tutorial for beginners: C# Database Connection Tutorial with Example[^]

And for ASP.NET: Insert, Update, Delete: ASP.NET Database Connection Tutorial[^]

Note that SQL Server is not the easiest of databases to work with, here are some alternatives if your needs are simple: best-databases-for-a-small-net-application[^]
   
v3
Rate this:
Please Sign up or sign in to vote.

Solution 2

Start by thinking about your data: what is it? how is it related to other pieces of data?

For example, a customer may have a name and address, and a company will hopefully have more than one customer. That means you would need a Customers table which stores:
ID (so that you can have two customers with the same name)
Name
Street line 1
Street line 2
Town
County / State
Telephone number
Mobile number
Email
And each Customer would have their own row in the same table.
But for Invoices, it's different; each invoice has a customer, a date, a total, and a set of products - which means three tables: the Customers from before, the Invoices, and the InvoiceLines tables:
Invoices:
ID (To makes sure they are all distinct)
CustomerID (so you can tell which customer owes you money)
InvoiceDate
DueDate
Paid
Total
InvoiceLines:
ID (so they are all different)
InvoiceID (so you can tie the set of lines back to an Invoice)
Quantity
Product
Value

Databases are all about the relationships between data, and you only separate items into different tables when there is good reason to do so - most often when you will have "many of these" associated with "one of these": "Many orders" from "the same customer" for example.

So start by thinking about the data, and how it is organised in the real world - then think about how to create a database model of that world!
Then start thinking about actual databases! :laugh:
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100