Preface:This tutorial was intended to focus on introducing the SQL database. However, it says that there is already a lot of data-related knowledge. Simply write down the entire development process of the project. Due to the tight schedule, the course was in a hurry and I felt sorry for writing, but there were so many processes in the previous project (excluding post-testing) and when to do so, what tools and skills should I use? I have almost said so, and my ability has reached this point. Note: Each stage generates corresponding documents, which is very important. Do not ignore them when you are actually working on a project!
Until now, I have been in touch with the database for about a year. I didn't understand it at the very beginning. It's so hard to use it. After a year of accumulation, although it's still a little dish, but you also know something. In order to sort out the knowledge and help more people better learn the database, I decided to sort out what I learned. Given that there are a lot of database tutorials on the Internet, but many of them are isolated knowledge points, it is difficult for beginners to grasp the database as a whole, and it is difficult to learn, it will also generate a certain degree of fear; at the same time, in the face of a wide range of information on the network, it is often difficult for beginners to choose a better method, it is likely to master outdated or less practical technology, of course, including me.
Based on the above situation, this tutorial demonstrates a complete database project development process based on the actual database application, it involves some experience and skills in database design, the use of some tools in the project development process, and the three-tier architecture. Of course, I am also a small dish. In addition to limited time, it is impossible to talk about all the knowledge points. Some basic knowledge is moved forward, focusing on macro guidance and application experience, detailed readers go to Baidu or Google on their own. The tutorial aims to guide beginners to become a professional database application developer. This tutorial uses sql2005 database and C # as an example to build a simple student management system. Although this tutorial is a preliminary tutorial, it is not suitable for 0-based shoes and is suitable for confused shoes. Speak nonsense and start with the question.
1. Why should I select the SQL database.
As an international practice, we should first explain why SQL database should be selected. In fact, it is not as good as SQL databases. I know a few dishes like SQL databases. The main reason is that SQL data is simpler than other databases, including installation, configuration, and usage, the principles of databases are the same, so it is not a problem to learn other things. On the other hand, SQL databases are already very professional and cost-effective. Is it better to learn access databases? In fact, I only know SQL. As for what the SQL database is and what features it has, this is left for the readers to find the answer, and I believe everyone on Earth can find it.
II. Introduction to database principles.
A database, as its name implies, is the place where data is stored. SQL Server 2005 is a large database management system. In this large system, we can create many databases for differentProgramService. Generally, an application only has one database. With the database, the specific data content is involved. The SQL database contains N tables, and each table contains rows and columns. Each column is called a field and each row is called a record, just like coordinates, the X axis is a record, and the Y axis is a field. A field is defined when a table is created. It has a name and a type, and these fields are linked together as a record. Therefore, theoretically a table can have unlimited records. N tables in a database are associated by links, which is a relational database in the legend. It seems a little messy, as shown in the following figure:
These are the most basic knowledge. Why do you need to mention them? To be honest, I had a hard time understanding this. Here I propose that I want to give readers some on-demand videos.
3. Permission configuration.
In fact, you do not understand permission configuration, or you can use the database normally. Generally, the SA account is used directly. As a complete database tutorial and known as a professional tutorial, permission configuration must be involved.
As a database platform, SQL Server is certainly not used by one user. Since many users use SQL Server, permissions are required. For example, user a cannot arbitrarily change user B's database, and user a cannot have system administrator permissions. When talking about permissions, you have to mention the role. What is the role? In short, it is a set of permissions. In this way, if you want a user to have certain functions, you only need to specify roles, instead of assigning permissions one by one, which makes permission allocation more convenient and unified.
Role diagram in SQL Server:
Note that the server role is at the SQL platform level and has only a fixed role (the system-defined permission group). The database role is at the database level, A user is the db_owner role of database A, not necessarily the db_owner role of database B. It is divided into fixed roles and custom roles.
Learning these skills may not be available now, but permission management, as an important feature of databases, will certainly be useful in future work. It's okay to understand it now. Only the role type is listed here, and no creation method is provided, Google!