Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Beginner's database questions

I am, a beginner to databases, and am very inexperienced at programming generally. For a C# console app (I'm writing with VS Express), which after testing will have a UI added, I need to use a database to store its data.

Can someone tell me, or point me to, bare beginner's explanations, and pros and cons, of these database access methods so I can decide which I should use?:

  1. SQLClient
  2. ORM
  3. OleDB
  4. ODBC
  5. ADO.NET
  6. nHibernate
  7. MS Enterprise Library
like image 449
ChrisC Avatar asked Dec 20 '25 00:12

ChrisC


1 Answers

Quite the mix there ... first some explanations ...

1) SQL Client An SQL client is an application that connects to a SQL Database for the purpose of querying / managing / working with the data in an SQL Database. (any program accessing a database, phpAdmin, SQLite Administrator, etc...).

2) ORM is object-relational mapping. Its a way to convert different types of data when data types are incompatible. Think about a car class that incorporates four instances of a tire class. This type of structure doesn't translate well directly to the types available in database design and may be a reason to use ORM. (To relate the objects (car, tires, etc..) into the plain database types (integer, float, blob, etc..)

3) OLE (pronounced Olay) DB Is the Microsoft method (API) for connecting to Database using COM. OLE DB is part of the MDAC Stack (grouping of MS technologies working together in a framework for data access).

4) ODBC is Open Database Connectivity and its an alternate API for for Database Management Systems (DBMS). Where OLE DB is a COM (Component Object Model) way to integrate with databases, ODBC aim's to be language independent.

5) ADO.NET is a set of base classes (API) for use in the .NET languages to connect to and communicate with Databases.

I would suggest starting with ADO.net for your C# background, OLE is typically for older (VB classic) applications, There is a good beginner tutorial here http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson01.aspx

Don't let all the terminology scare you off, once you jump in and start tinkering you will understand all of the answeres provided better...

Best of Luck in your coding!! :-)

like image 197
Robert French Avatar answered Dec 21 '25 14:12

Robert French