i have in the Visual C# 3 options of database :

1. SQL SERVER (.sdf)
2. ACCESS (.mdf)
3. ADO.NET (.edmx)

which database advisable to use???

*if you give me answer please give me tutorial\book\name of book.

thanks.

Dani AI

Generated

Quick clarification (you were mixing file types, not separate engines). The three choices in Visual Studio mean different things: the .sdf option is a SQL Server Compact (embedded single-file) database; the .mdf option is a SQL Server data file (the primary data file used by LocalDB/Express or a full SQL Server instance); and the .edmx option is an ADO.NET Entity Data Model file (metadata for Entity Framework) — it is not a storage engine. ADO.NET itself is the data-access API you call from C#. (learn.microsoft.com)

Which to use — short, practical rules:

  • If you need a tiny, cross‑platform, zero‑install local DB, prefer SQLite (modern, supported). (sqlite.org)
  • For Microsoft-stack development use LocalDB (a lightweight SQL Server Express runtime) or SQL Server Express for multiuser/test deployments; those use .mdf files and scale to production-grade engines when needed. (learn.microsoft.com)
  • Access (.mdb/.accdb) can be fine for single‑user desktop tools, but avoid it for high-concurrency or web apps. (support.microsoft.com)
    Note: SQL Server Compact (.sdf) was convenient historically but has been deprecated; pick SQLite or LocalDB for new projects. (learn.microsoft.com)

On coding style: write your data-access layer so you can switch engines later. Use ADO.NET provider patterns or DbProviderFactory for provider‑agnostic code (good point from ). If you want an ORM, EDMX is a design‑time EF artifact; EF Core favors code‑first and does not use new EDMX tooling. (learn.microsoft.com)

Good learning resources: Julia Lerman’s Programming Entity Framework (O’Reilly), Jon P. Smith’s Entity Framework Core in Action (Manning), Bill Karwin’s SQL Antipatterns (Pragmatic) and Itzik Ben‑Gan’s T‑SQL Fundamentals for SQL basics. These cover ORM patterns, production considerations, and proper relational design. (app.oreilly.com)

Pick by needs: concurrency, backup/restore, security, and deployment matter more than a file extension. Learn the relational basics first, then pick LocalDB/SQLite to experiment and move to SQL Server Express/Standard when you need multiuser or managed hosting.

Recommended Answers

All 2 Replies

i have in the Visual C# 3 options of database :

1. SQL SERVER (.sdf)
2. ACCESS (.mdf)
3. ADO.NET (.edmx)

which database advisable to use???

*if you give me answer please give me tutorial\book\name of book.

thanks.

ADO.NET is Database Integration class library and Entity Data Model is a an Object/Relational Mapping (ORM) framework. (Read MSDN article).

>which database advisable to use???

Learn the fundamentals of database and you will work on any database product.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.