简体   繁体   English

SQL Server-数据库问题

[英]SQL Server - Database Questions

I'm a bit confused at the moment. 我现在有点困惑。

1) I am using ASP.NET and building a web interface based on an Access database. 1)我正在使用ASP.NET并基于Access数据库构建Web界面。 However, I'm told it doesn't use the Access database - it uses Jet.. What does this actually mean as I select 'Microsoft Access Database' when I find the data source, so isn't it an Access database? 但是,我被告知它不使用Access数据库-它使用Jet。这实际上是什么意思,因为当我找到数据源时选择“ Microsoft Access数据库”,那么它不是Access数据库吗?

2) Is there such thing as an SQL database? 2)是否有SQL数据库之类的东西? As isn't a MySQL database an SQL database? MySQL数据库不是SQL数据库吗? And doesn't Microsoft's SQL server host actual SQL databases? 微软的SQL Server是否不托管实际的SQL数据库? If not, what does it host? 如果没有,它将托管什么? And what actually are things such as MySQL if they aren't SQL databases? 如果不是SQL数据库,那么诸如MySQL之类的东西到底是什么?

3) Is it possible to create an SQL database that is simply an SQL database or does it have to be a varient such as MySQL? 3)是否可以创建仅是SQL数据库的SQL数据库,还是必须是像MySQL这样的变量?

4) Can I create web forms in ASP.NET to edit the Access/(whatever DB I make it) data and add new records? 4)是否可以在ASP.NET中创建Web表单来编辑Access /(无论我使用哪种DB)数据并添加新记录? If so, how would I go about doing this and are there tutorials for this? 如果是这样,我将如何去做,是否有相关的教程?

Bit long I know, but if anyone can help.. 我知道有点长,但是如果有人可以帮助..

Thank you! 谢谢!

  1. Jet is the 'connection engine' or 'driver' that Windows uses to communicate with your Access database/file. Jet是Windows用于与Access数据库/文件通信的“连接引擎”或“驱动程序”。

  2. SQL is the acronym for Structured Query Language. SQL是结构化查询语言的缩写。 Some people use the term SQL coloquially or shorthand for Relational Database Management System (RDBMS or platform). 有些人通俗地将SQL一词用作关系数据库管理系统(RDBMS或平台)。 A "SQL database" is most likely meaning a database engine/RDBMS that implements the SQL language; “ SQL数据库”最有可能意味着实现SQL语言的数据库引擎/ RDBMS。 meaning you can query/manipulate it using SQL statements/command. 这意味着您可以使用SQL语句/命令来查询/操作它。 Database vendors like Oracle and Microsoft, among others, make RDBMS products (Oracle 10g + MySQL and SQL Server, respectively) which host databases. Oracle和Microsoft等数据库供应商制造了承载数据库的RDBMS产品(分别为Oracle 10g + MySQL和SQL Server)。

  3. Likely answered by above. 可能由上面回答。

  4. Most definitely. 明确地。 That's another topic onto itself. 这是另一个话题。 This tutorial , among others, can get you started. 教程以及其他内容可以帮助您入门。

1) I can't help you here 1)我不能在这里帮助你

2) You are confusing terms. 2)您对条款感到困惑。 SQL is a language that one uses to write queries against a database system. SQL是一种用于对数据库系统编写查询的语言。 The overall database system is often called a RDBMS . 整个数据库系统通常称为RDBMS Various vendors provide different RDBMS. 各种供应商提供不同的RDBMS。 MySQL is one, SQL Server (from Microsoft) is another, Oracle has another, SQLite is another, PostgreSQL is another, etc. MySQL是一个,SQL Server(来自Microsoft)是另一个,Oracle是另一个,SQLite是另一个,PostgreSQL是另一个,等等。

3) You must choose a RDBMS, such as MySQL, then you can write SQL against it. 3)您必须选择RDBMS,例如MySQL,然后可以针对它编写SQL。

4) Yes, you can. 4)是的,可以。 In .NET, LINQ is a popular way to do this. 在.NET中,LINQ是执行此操作的流行方法。 You can try out LINQ expressions using LINQPad . 您可以使用LINQPad尝试LINQ表达式。 The more traditional way is to use the SqlCommand class. 更传统的方法是使用SqlCommand类。 For instance, with MySQL you would first install MySQL Connector/NET - here is a tutorial for that. 例如,对于MySQL,您首先要安装MySQL Connector / NET-这是一个教程

Just google around for C# and SQL - loooots of people have dealt with this issue before (: 只是谷歌搜索C#和SQL-许多人之前已经解决了这个问题(:

Answers. 答案。

  1. Microsoft Access is a product built on top of http://en.wikipedia.org/wiki/Microsoft_Jet_Database_Engine and that is where "Jet" is coming from. Microsoft Access是建立在http://en.wikipedia.org/wiki/Microsoft_Jet_Database_Engine之上的产品,而这正是“ Jet”的来源。

  2. SQL is short for Structured Query Language. SQL是结构化查询语言的缩写。 It is a standard which many database engines. 它是许多数据库引擎的标准。 try to implement. 尝试实施。 Any database that implements the standard to some extent can be called SQL. 任何在某种程度上实现该标准的数据库都可以称为SQL。 (Note, MS Access and MySQL both implement the standard in non-standard ways.) (请注意,MS Access和MySQL都以非标准方式实现该标准。)

  3. Your question is like asking whether it is possible to have a car that is just a car and not a variant like a Toyota Yaris. 您的问题就像问是否有可能拥有仅是汽车而不是Toyota Yaris这样的变体的汽车。

  4. There are many tutorials out there. 有很多教程。 Please note that if you are just starting I would strongly recommend that you not use MS Access. 请注意,如果您只是开始,我强烈建议您不要使用MS Access。 Pretty much any other option would be better, including SQLite. 几乎所有其他选择都会更好,包括SQLite。

  1. No idea 不知道
  2. Yes, it's true, but in general it is considered more proper to say "relational database," because what's important about relational databases is that they're relationally structured, more so than that they use SQL to query them. 是的,的确如此,但是总的来说,说“关系数据库”更为合适,因为关系数据库的重要意义在于它们是关系结构的,而不是它们使用SQL来查询它们。 You could even have a relational database without SQL, but I'm only aware of one and nobody uses it. 您甚至可以拥有一个不带SQL的关系数据库,但是我只知道一个,没有人使用它。 Saying "SQL database" says more about you than the database. 说“ SQL数据库”比说数据库要多。 :) :)
  3. Not especially. 不特别。 You can restrict yourself to SQL that is likely to work on different databases, but all relational databases have differences. 您可以将自己限制为可能在不同数据库上运行的SQL,但是所有关系数据库都有差异。 It's very unlikely, for example, that your CREATE statements will be fully portable. 例如,您的CREATE语句不太可能完全可移植。 It's much more possible to make your SELECT s portable, but even there, it becomes a question of which features do you want to not use. 使SELECT便携式计算机具有更多的可能性,但即使在那儿,这也是您不希望使用哪些功能的问题。

    Your application must eventually actually connect to a real database anyway. 无论如何,您的应用程序最终必须最终实际上连接到真实的数据库。 You can push that decision around but you must eventually make it. 您可以做出决定,但最终必须做出决定。 Abstraction layers exist to mitigate the problem, but they often become a problem all their own. 存在抽象层来缓解问题,但是抽象层通常本身就是一个问题。

  4. No idea. 不知道。
  1. Access is a database product from Microsoft and, at some point, they broke out the database "engine", called Jet to ship as a separate component, allowing developers to use it stand-alone. Access是Microsoft的数据库产品,在某些时候,他们推出了称为Jet的数据库“引擎”,将其作为单独的组件提供,使开发人员可以独立使用它。 You can use Jet without Access. 您可以使用无访问权限的Jet。 Jet is the engine that does the work and Access includes both that and the fancy GUI and other tools, none of which are needed for real database use, though they're sometimes handy for database design. Jet是完成工作的引擎,Access包含了该工具以及精美的GUI和其他工具尽管在数据库设计中有时它们很方便但真正的数据库使用并不需要这些工具

  2. SQL is a standard data definition and data manipulation language (DDL and DML). SQL是一种标准的数据定义和数据处理语言 (DDL和DML)。 It is not a product per se. 它本身不是产品。 There are many products that implement SQL, such as DB2, Access, MySQL and (some might say) Oracle :-) 有许多实现SQL的产品,例如DB2,Access,MySQL和(可能有人说)Oracle :-)

  3. See 2 above. 请参阅上面的2。 Provided you don't use any vendor-specific features, your DDL/DML should be portable to all database products (albeit at the cost of possibly being less optimised). 如果您不使用任何特定于供应商的功能,则您的DDL / DML应该可移植到所有数据库产品中(尽管可能会降低优化程度)。

  4. Yes. 是。 I would start by whacking asp net web form crud into that Google search control you probably have somewhere at the top of your browser. 首先,我将ASP.NET asp net web form crud插入到您可能在浏览器顶部的Google搜索控件中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM