First, you should learn a little about the various technologies and APIs for connecting to the database.
A more traditional method is ADO.NET, which allows you to easily define connections and execute SQL queries or stored procedures. I recommend fetching a basic ADO.NET tutorial using Google, which may differ depending on what type of project you are creating (web application, console, WinForms, etc.).
Now ORM days are becoming more popular. They allow you to define your model of the object in the code (for example, each database table will be a class, and the columns will be the properties of this class) and bind to an existing database. To add a new row to the table, you simply create an instance of the class and call the Save method when you are done.
The .NET framework has LINQ to SQL and Entity Framework for this type of template, both of which have many online tutorials. An open source project that I really like is Castle Active Record, which is built on top of NHibernate. This simplifies the definition of ORM.
If you have specific questions about any of the above issues, feel free to post a new question with more specific queries. Good luck
Update:
I thought I would add another link, because it seems that you might be interested in working with local database repositories rather than creating a client-server application. SQLite allows you to interact with local repositories in the file system through SQL code. There's also a .NET binding supported by the SQLite guys (which theoretically allows you to work with the other platforms I mentioned): http://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki
source share