C#中的数据库并建立连接

时间:2021-12-30 14:56:12

OK. I'm a beginner programmer and I want use database to store my data (like a student fields), Then should I install a SQL Server Enterprise? SQL Express edition? SQLite? MySQL? or ...? which one? I'm confused like hell. Then what's a LINQ? or ADO.Net? These are a kind of connection to above's(SQL Server, ...) or what? And finally when I created a application with a database that stores data, End User who wants install my application must install a kind of database?!

好。我是一名初学程序员,我想使用数据库存储我的数据(如学生字段),那么我应该安装SQL Server Enterprise吗? SQL Express版本? SQLite的? MySQL的?要么 ...?哪一个?我很困惑地狱。那么什么是LINQ?还是ADO.Net?这些是上面的一种连接(SQL Server,...)还是什么?最后,当我使用存储数据的数据库创建应用程序时,想要安装我的应用程序的最终用户必须安装一种数据库吗?!

2 个解决方案

#1


1  

For Database you can use anything you want. I like to use PostgreSql because is open source so don't have to pay for license, and have a very good spatial library. MySql is also opensource, but lack of powerfull tools like CTE or rank analytic functions like lead.

对于数据库,您可以使用任何您想要的。我喜欢使用PostgreSql,因为它是开源的,所以不需要支付许可证,并且拥有一个非常好的空间库。 MySql也是开源的,但是缺乏强大的工具,如CTE或排名分析功能,如铅。

Then Ado.net is how you connect to database to bring data to your C# apps, and LINQ is how you handle that data.

然后Ado.net就是你如何连接到数据库以将数据带到你的C#应用​​程序,而LINQ就是你处理这些数据的方式。

For end user probably will need install same database as you, unless you provide remote access to your database or configure a cloud data source by creating a webservice

对于最终用户,可能需要安装与您相同的数据库,除非您通过创建Web服务提供对数据库的远程访问或配置云数据源

#2


0  

That depend what you need. Sqlite is fine if no more than one user is using it at this same time. But bd can be easily moved with application. Server type db is better for simultaneoulus operations from multiple users. Can be moved either or can be acessed from copy of your app. I would recommed doing homework to be honest as this I very generic question and there is plenty info about databases out there.

这取决于你的需要。如果同时只有一个用户使用它,Sqlite就可以了。但是可以通过应用程序轻松移动bd。服务器类型db更适合来自多个用户的simultaneousoulus操作。可以移动,也可以从应用程序的副本中删除。我会建议做作业,说实话,因为这是一个非常通用的问题,有很多关于数据库的信息。

#1


1  

For Database you can use anything you want. I like to use PostgreSql because is open source so don't have to pay for license, and have a very good spatial library. MySql is also opensource, but lack of powerfull tools like CTE or rank analytic functions like lead.

对于数据库,您可以使用任何您想要的。我喜欢使用PostgreSql,因为它是开源的,所以不需要支付许可证,并且拥有一个非常好的空间库。 MySql也是开源的,但是缺乏强大的工具,如CTE或排名分析功能,如铅。

Then Ado.net is how you connect to database to bring data to your C# apps, and LINQ is how you handle that data.

然后Ado.net就是你如何连接到数据库以将数据带到你的C#应用​​程序,而LINQ就是你处理这些数据的方式。

For end user probably will need install same database as you, unless you provide remote access to your database or configure a cloud data source by creating a webservice

对于最终用户,可能需要安装与您相同的数据库,除非您通过创建Web服务提供对数据库的远程访问或配置云数据源

#2


0  

That depend what you need. Sqlite is fine if no more than one user is using it at this same time. But bd can be easily moved with application. Server type db is better for simultaneoulus operations from multiple users. Can be moved either or can be acessed from copy of your app. I would recommed doing homework to be honest as this I very generic question and there is plenty info about databases out there.

这取决于你的需要。如果同时只有一个用户使用它,Sqlite就可以了。但是可以通过应用程序轻松移动bd。服务器类型db更适合来自多个用户的simultaneousoulus操作。可以移动,也可以从应用程序的副本中删除。我会建议做作业,说实话,因为这是一个非常通用的问题,有很多关于数据库的信息。