How can I design these classes?

TinyTree

Member
Joined
Jan 23, 2013
Messages
8
Programming Experience
Beginner
I am a beginner. I want to design a database(.mdb) that contains two tables (one is main table that represent a person and his base case, the other related the first talbe represent the salaries of every year),I can use this database. and how can I design these classes relate the database and use ado.net to delete 、 change、add the database . mdb-----------classes(use ado.net), can you help me?
 

jmcilhinney

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
3,130
Location
Sydney, Australia
Programming Experience
10+
Design the database first in Access and then add it to your project. That will fire up the Data Source wizard and generate a typed DataSet, complete with TableAdapters. The DataSet stores the data in its constituent DataTables and the TableAdapters retrieve and save the data.
 

TinyTree

Member
Joined
Jan 23, 2013
Messages
8
Programming Experience
Beginner
Thanks a lot. If a project need you to design many classes ,how to think about it and design it? (UML is too difficult to me)
 

TinyTree

Member
Joined
Jan 23, 2013
Messages
8
Programming Experience
Beginner
The other question is the difference of dataset and strong typed dataset?
 

jmcilhinney

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
3,130
Location
Sydney, Australia
Programming Experience
10+
Thanks a lot. If a project need you to design many classes ,how to think about it and design it? (UML is too difficult to me)
UML is often overkill and generally not actually needed even for large projects, although it can be beneficial in some cases. Just start by thinking. What are the entities your application will need and what are the attributes they will have? As you think of them, simply write them down.
 

jmcilhinney

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
3,130
Location
Sydney, Australia
Programming Experience
10+
The other question is the difference of dataset and strong typed dataset?
The DataSet and associated classes are very generalised to allow for absolutely any data of any type in any combination. Most specifically, columns in DataTables are specified using Strings and each field in a row is an Object reference. That means that you get no help from the compiler as far as the names or types of the data in a DataTable. A typed DataSet is generated by the IDE to be specific to your data source. It uses all the standard classes (DataSet, DataTable, etc) as base classes but adds extra properties and methods that are specific to your schema, e.g. the DataSet has a property for each DataTable and a DataRow has a property for each field. This means that you get full support from the compiler, e.g. Intellisense and strong typing.
 

TinyTree

Member
Joined
Jan 23, 2013
Messages
8
Programming Experience
Beginner
Thank you for your patience,and a new question is arised,could I created typed dataset by hand? could you give me an example?
 
Top Bottom