NoiseSystem database design experience - good potato Fly

Team: potato good fly

Members: Qiao Xiangshuo Dangao Fei Yang Huihui Liang Jiahao Pan Jing Yu

Finishing: Qiao Xiangshuo

PM Qiao Xiangshuo:

At 14:30 on October 25 to 17:30, at 14:30 on October 27 to 17:30, at 14:30 on November 1 to 17:30, nine hours later we only do one thing - Design database.

Before starting database design, our team members have carried out a simple concept, real name Chan Liang Jiahao point classmate, he directly put my database designed to document that provides a general direction for us. I also made a record during the discussion, the following was recorded contents October 25 meeting:

Conference record of database design

Overall, I think our project database designed like an iterative three times, each step will advance through temporary "careful consideration", then lucky enough to get the project instructor Chou, database design instructor Yin teacher, class discussion guide Li teacher teacher's guidance, let us recognize the limitations of thinking, so as to further promote the progress of database design, database design so that we move towards perfection.

Prototype Project has been almost completed, the project has taken shape demand, database design does not seem much of a workload. In my idea before the start of database design proved to be wrong, we are also intense discussion of database design come to realize that the design of the database will be realized to a large extent influence the difficulty, while the field-free design database does not reflect the details, we must "end of the phone to upload data to the server noise" from the refined to the "phone side noise once every five seconds to upload data to the server, the data need to record the noise in these five seconds maximum, minimum, and average upload time, the uploader, and upload location information needs to be recorded in some way ", and which determines each field are not easy.

Some seemingly simple database table design also after the "express their views - there are differences - argue - to reach a consensus," the process. I was deeply impressed table area is shown below:

 

 

Region Table

 

We use the program is based on latitude and longitude scope of the various landmarks of Hunan University, Hunan University, will be divided into multiple zones, noise data for the upload location is classified. But we are not so originally envisaged - it is clear, direct recording noise data corresponding to the latitude and longitude easier to implement, and location information directly as noise data fields can reduce database design difficult, but we have gone through many discussions, taking into account the noise data If the page is displayed directly provide detailed latitude and longitude, it will be very intuitive, so no lost this program, but in the case of reserved latitude and longitude information, the introduction of an area shown below concepts:

 

Introducing the concept of the design of the database area

 

In dealing with user avatar information, I proposed the establishment head table gives the number of sheets to choose the picture, the user can only choose one. This one can make the avatar management more simple and efficient, but is simpler to implement, we do not have to consider avatar of storage for each user-defined and corresponds to the additions and deletions to change search head table, and It requires only a foreign key to a table or a fixed table.

Head table

There are many similar design details. It is a member of the team complement each other well in the "express their views" in the process of "spare no pains," we continue to improve database design, it has laid a good foundation for the development of our project. Revolution is not successful, the road was the same when trying the case.

 

Dan Gaofei:

In database design, we have week and instructor teachers, Yin teacher responsible for teaching our database design, communication many times, gave us a lot of valuable advice, for example, the structure of the table should be logical, carried out for the needs of table design needs to consider whether the point is really feasible and effective. It also largely promote the progress and improvement of the design of our database design.

Because the design of the database will directly affect the difficulty of the operation display a page of data, so we are careful deliberation at design time.

Noise data with the user table

For our core system, which is stored noise data table, we are very careful, spent a lot of time to consider its constitution. Considering the map display and curve generation, we will be noise original data into data tables, each 5s record a noise information; taking into account the additions and deletions to change search users to upload records, we designed a table to upload records; taking into account the identity map a huge amount of computation, we decided not updated in real time, to take a method of storing map data identified to improve the operating speed ......

It is worth mentioning that, when we discuss the user to upload the recorded information, I propose the maximum, minimum and average values ​​are stored directly in a sound recording, although considered in the discussion of this data is not a big role, is not able to reflect the specific information for certain scenarios, you want to remove this table, but after analysis found that demand for mobile phone users, this data may be the most useful and most intuitive. Seize this point, we finalized the following table structure, completed the database design of this section.

 

Users to upload records table

Ultimately, the approach we take in on database design are:

  For a page thinking: what data it needs to be rendered? What data should be stored in the database? Logic operation between the page and the database is simple and clear?

  On this basis, additions or deletions to the data type and a field setting table.

There are so many discussions here will no longer list them.

By thinking of these logical and reasonable, we have improved the rigor of their own thinking in the discussion, but strengthening our ability to be a clear expression of their views! I believe that this experience team project that I would get the harvest in the present, the future benefit.

 

Yang Huihui:

Our database is a design from simple to complex, from the rough to the specific process.

Because we are all beginners in this database design process, we discussed many times before and after the modification, even if the ultimate basically settle down time, or the database will be modified, such as increasing the number of fields or delete some fields to accommodate our needs.

Prior to the initial design, it is to discuss, on the basis of adding and deleting some of our group Liang Jiahao want on the table.

 

The initial database design ideas

 

On the basis of this picture, we had a heated discussion up to more than four hours, eventually set the database tables and fields we need. At that time we edit an Excel table is shared to complete this step. Like this. At that time for noise data table, we loggerheads over several rounds, especially for noise data table records and upload tables. Finally, we integrated a variety of conditions, for the reasons put forward, determined to complete these fields.

 

 

Database Design (EXCEL representation)

 

 

When completed these tables, we went to consult the database design Yin teacher, asked the teacher to give us advice. Yin teacher at the outset that we do not use tools with Excel completely fail to reflect the relationship between the tables, and we now have downloaded a good PowerDesigner, this tool is perfect for this stage of the design. In addition, Yin teacher and we say, how to determine the database design is complete, it is based on a prototype interface, look at the data required for this interface, is able to be removed from the database. If all of them out, then the database integrity ensures that the back is reasonable to consider whether and how to improve efficiency. So, at the suggestion of a teacher Yin, we powerDesigner make a simple drawing to express our design content.

 

 

Database Design (CDM representation)

On the basis of this interface, based on the discussions we have continued to improve, according to the function point to determine now the ultimate version.

 

 

Group members together to complete the database design

Database design is not a one-time work can be done, especially for beginners that we discuss together, study together, determine what needs to be modified, in the process, we will be able to learn a lot.

 

Liang Jiahao:

Before the group began to design the project database, I will discuss the first sort out the general table of contents and the contents of the entire project database fields according to their own understanding of the entire project team and the previous meetings. After this thought in advance to construct the database is completed, the specific design and perfect the next database will be relatively smooth. But to my unexpected it is that I only have a framework of reference for some, and in the process of continuous improvement and the continuous demand for database changes, the database also continue to be adjusted to fit the needs. Which takes the most time, the biggest change is the core of our data - noise data is stored.

In my most primitive structure of the database, I am referring to the predecessors of ideas, decibel data when the phone is recording a second storage time noise, uploaded to the database. In the course of the meeting, due to the design of the database do not have much experience, so using Excel to a database field display, so there is no in-depth discussion of the specific content of the field.

 

 

 Representation of database tables ECEL

In the next meeting, when we wanted to explore in depth implement a database on demand found, recording time noise data in the table with a lot of ambiguity. It actually refers to the period of time or a moment? When referring to a moment, then the user data in the query upload their own recording time do we give the user to view a user to upload data per second it? If refers to the period of time, the flexibility of the data will be greatly hampered. Blowing a problem, we deeply understand this point, database design should be used specialized tools , such as powerdesigner.

Found in the database does not fit with the needs of the future, we have to start rethinking how to store the noise data. After a discussion in the afternoon after we decided to add a table to store the user to upload records at one extreme and the average value of the data recording process, the role of the table only when the user is to be able to have the query upload records and a good display more reflect the accuracy of the data. So far I understand, in the design of the database and sometimes we do not need to add an original example of a necessary demand.

 

 

Upload record sheet

But that is not all. We originally envisaged for the user during recording, only the data stored on the phone, only the corresponding data uploaded to the database from the phone after the user stops recording. The idea at the outset did not seem a problem, but as we discussed several times gradually found it unreasonable, cite a simple example, if a user would place the program has not been interrupted backstage recordings and recordings, regardless of his record how much data is ultimately not uploaded to the database. So we have to change in order to conduct a noise data is uploaded every 5 seconds during recording, upload recorded after the end of the recording uploaded data uploading data. Therefore, we have changed the most primitive noise data table. At this point I also know, we sometimes make changes to the database based on changes in implementation of technology in the design of the database.

Noise Data Sheet

A simple noise data storage issues we have conducted a number of changes, visible database design is the need to follow specific changes in various aspects of the project and uh adjustment. The database design experience also let me get a lot of valuable experience.

 

Pan Jing Yu:

After designing the database learned a lot:

First, the database design is tightly bound with the demand, before the design of the database you want to have a well established demand, will be discussed in order to understand the needs of the database to good design;

Second, when using the rotation power designer for cdm pdm If the relationship is one to one, can be used in the design table foreign key relationship, if many relationship or a many relationship and a need to add attributes in relation to the association of the recording can be designed;

The following two figures: is a many to many relationship, and thus need to add a property to use such association is used after pdm automatic transfer function can automatically generate a table;

 

 

Entity table and table

 

Third, the design of the database is also important to hold the primary key for the table's primary key different situations have different design approaches such as fundamental to the table will not change, such as the head table, the table will be the corresponding area when creating a table data import, and use this time does not substantially change the logical primary key as the self-energizing type int, is a good choice, as a foreign key is used is also very easy; but for a user table, which table to be updated in real time using these types of primary keys is not appropriate, for example, to register a user, then the user is going to determine whether to register with the data in the table in order to know when one matched duplicate account, if the account is set as the primary key, then you can look through the primary key index to know whether it is repeated; from this example we can see that for essentially the same table can be used when designing the logical primary key primary key for the table need real change, we better choose natural key;

Fourth, field types should think carefully about when designing a table, for the length of the char to be carefully considered, and should be carefully considered for decimal floating-point type;

Fifth, there are more important point is to understand that database only database, he is not a panacea, but to warehouse to store data, to clear his duties and scope of the problem is too complex for logical database design, it is Do not use the database to complete, more large use code to complete.

 

Guess you like

Origin www.cnblogs.com/hnu2017/p/11823019.html