The essence of the concepts of the database?

The problem is the following. I want to fill the gap in knowledge about SQL, what it is and what it eats (I need this because almost all of C# jobs require advanced SQL knowledge).
When I start to read books on SQL, then immediately faced with the query syntax, tables, and other things. It's great, but doesn't give me understanding of such basic questions as:
- What specific Database at all?
It's a single file as a dynamic library in which are the data or something else? Where it should lie - in database or in directory with using that program?
- That takes the SQL queries if we call them from C# code?
Installed on the computer database? Library in the composition .NET?
June 27th 19 at 15:01
2 answers
June 27th 19 at 15:03
What is the specific Database at all?
More simple words, it is
June 27th 19 at 15:05
SQL generally require more programmer vacancies. Not only in C#....
At the time SQL was invented to help ordinary MANAGERS, not programmers, could retrieve data from the database, writing queries in almost natural English. It's just.

Usually SQL is called relational databases. Recently simplified SQL used for the other, but still born and optimized SQL is for relational.

A relational database is a collection of tables with columns whose fields are related in meaning.
The columns are fixed, have their names. Table grows line by line, the lines can be units or millions doesn't matter.
Moreover, the order of the rows does not matter - that is, once you get the lines from the table in the same order, other times in a different order, such as whether the program, not you. If the order is important to you - you need to explicitly specify it in the query, but this requirement reduces the speed of the query.


Table "Teachers"
Column "Surname", Column "date of birth", Column "Price of one academic hour"

Table "group of students"
The Column "Title", Column "Number"

Table "Sessions"
The column "group Name", "Surname teacher", "item Name", "date of study"

Can find out how much money you need to pay the instructor for all classes:

SELECT Name, SUM(Value academic hours) FROM Faculty, Class WHERE Faculty.Name = Classes.The name of the teacher GROUP BY Name

Or what our institution costing classes

SELECT item Name, SUM(Value academic hours) FROM Faculty, Class WHERE Faculty.Name = Classes.The name of the teacher GROUP BY the name of the object

Or print the schedule

SELECT the object Name, group Name, Name of teacher, date of lesson FROM Teachers, Classes WHERE Classes ORDER BY class date

The database may be a FILE and you specify your instrument (the library you use for database access) - the path to the file. This can be multiple files directory. Also point the way.

This may be a database server is a separate program. How it stores data, which files are not your concern. You to access the database you need to specify the server name (or IP address, or unix socket or named pipe), the database name, username and password.

In the first case, SQL takes a certain library (included in standard delivery .NET or additionally set), which you should not forget to include in the distribution of its Nakonechniy program.

In the second case takes the SQL, a separate program. But "a library" and then used. It accesses a database server in a special language Protocol (which you know is not necessary and not even useful).

However, SQL is just ONE of the OPTIONS for manipulation with database data. Pretty versatile and comfortable.

There are even ORM is a class of tools, not the language. It is more close to the original programming language.

Specifically for C# is even cooler tools - LINQ.

And, you can chat in the database with a blunt commands without all of this. And write something like: "take from the table the Teachers are all lines, save them in an array, then ....."

Find more questions by tags DatabasesSQL ServerSQL