Natural language search engine database design experience -T5 team on Federated knowledge map

Natural language search engine database design experience on a federal formula knowledge map -T5 team

According to panel discussions throughout the course of our database design, database design can be divided into two parts: planning, design section and summary section. The following points are based on the stage of preparation and precautions required in three stages elaborate.

I.  Preparation:

Design Tools

Among the database design process to use some software, software engineering Introduction to this course, Chou using powerdesigner carried UML diagrams design. Teach database design experiments with powerdesigner to design the database. In time learning to use the software, it is recommended to watch a video presentation of the study, there is nothing easier than learning the practical examples.

 Use Case Diagram

In all types of use case diagrams clearly Actor time is very effective. Usually give priority to design use case diagrams, use case diagrams Once you have, you can clear the project needed to complete the function. These functional modules are divided, re-design of the corresponding database, an idea is more commonly used. When performing module division, the database design is not only convenient, but also to facilitate the class diagram, activity diagram design. In the design of the database for different users, the equivalent of executive function operation, but in the design cdm, they usually fall into a misunderstanding: merely a parallel relationship between each entity and the entity cdm, and instead use case diagram as a function of the relationship has.

 

The use case diagram is designed according to the feature list before division Yu Jie students, who are primarily designed Huangzi Jun classmates. After completion of the design, but also members of the group were discussed and modified.

You can see in our project, users have two classes: tourists and ordinary users. Wherein a normal user administrator user derived class. Visitors have to register and search functions. Ordinary users log on under the user search patterns, view personal information, view the history, change passwords, modify the phone number, retrieve your password and other functions. Administrator user on the basis of the average user more than the administrative user rights, viewing online users and search other users history. Looked at the use case diagram of another group, in fact, we work with other groups in this section is about the same.

Later in the side of the group, said the teacher, you can use starUML, after using this software, found starUML compared to powerdesigner, is simply light Design. Easier operation, more concise image. In the above basis, again with starUML designed a use case diagram to illustrate our features:

 

 

 

The use case diagram is designed according to the feature list before division Yu Jie students, who are primarily designed Huangzi Jun classmates. After completion of the design, but also members of the group were discussed and modified.

You can see in our project, users have two classes: tourists and ordinary users. Wherein a normal user administrator user derived class. Visitors have to register and search functions. Ordinary users log on under the user search patterns, view personal information, view the history, change passwords, modify the phone number, retrieve your password and other functions. Administrator user on the basis of the average user more than the administrative user rights, viewing online users and search other users history. Looked at the use case diagram of another group, in fact, we work with other groups in this section is about the same.

Later in the side of the group, said the teacher, you can use starUML, after using this software, found starUML compared to powerdesigner, is simply light Design. Easier operation, more concise image. In the above basis, again with starUML designed a use case diagram to illustrate our features:

 

 

 Needs Analysis (document)

Software requirements analysis is an important activity planning stage, is also an important part of the software life cycle. In this session, we have to consider the good features we need to implement the basic functions of a clear and general framework of the project, task assignment and pave the way for the project design. With our project, for example, for individual centers design in the natural function is to achieve " information search " , " information modification " , " Search Results " and so on, and the design of the database is to focus on the natural functions of these design.

 

Second, the  design part:

 

In the design part of the database of the most important thing is to design the conceptual data model, that is called CDM.

 

In the design time of the beginning of the CDM, since map database compared to other parts of the group will be a little less, so early in the design encountered some problems. So, we have to consult the database system design experiments teacher Liu Yang. Because we in the design, always thinking only act as a primary key in a table, but Liu Yang teacher said: database design needs mainly need to use case diagrams and prototypes, some database design is not a must strictly in accordance with the requirements of paradigm, but to be designed according to the actual situation and capabilities. So give us a lot of inspiration.

 

1,  the establishment of entities:

 

The establishment of the CDM, the most important thing is to establish an entity, each good design attributes of the entity, the entity attributes to be realistic, but also in line with the current functional design requirements. During ordinary users and administrators when part of the design, the group produced a relatively large difference of opinion, some thought should establish an entity carved out such a property rights should be considered part of the establishment of two entities, because their function is not the same. Following the discussion and the teacher, I think it should be two more appropriate. details as follows:

 

 

 

 

Establish a good second part of the CDM is to establish good relationships between entities, corresponding to the user information table and administrator information table, methods used for the establishment of a login and role tables linking the two entities, this can be done during the login distinguished by the role:

 

 

 

 

Compared to the average user, the content administrator can view the history is more than the other table, so this time the contents of their history is also a need to distinguish, have a history of function point entity, is a you can check their own history, a history that can query all users. These historical records corresponding to the query link RDF data sets provided by:

 

 

Note: 1, where FIG impressions are all generated by the PDM CDM, in order to more intuitive results.

1, CDM and PDM are designed to note naming specification, you can use a script to a button.

 

2,  map database

Special place for this project, it is part of the content of the database needs to be designed as a map database, because the data set required for dealing with federated RDF datasets, they can not be stored with a relational database and is therefore designed to Figure in the form of a database. This time, a total of nine map database, there are pictures of open source database created by someone else from github:

 

 

 

 

When required to describe a large number of relations, traditional relational databases have been overwhelmed. It can afford a more solid relationship between entities but slightly simple case. As for the relationship between such entities is very complex, often you need to record data in the relationship, and the operation of the data are most relevant to the case and the relationship, the relationship between native support for graphical database is the right choice. Not only does it bring us to enhance operational performance, but also greatly improve system development efficiency, reduce maintenance costs.

In a graphics database, the main database consisting mainly in two types, and a set of nodes connected nodes. FIG aggregation node set is a series of nodes, relatively close to a relational database table as the most commonly used. The relationship is a graphical database-specific components. So for the use of a relational database used to develop people, how to correctly understand the relationship is the key to proper use of graphical database.

 

 

We can see from the figure above, when the need to represent many relationships, we often need to create a linked table to record the many relationships of different entities, but these are often not associated table to record the information. If you have multiple relationships between the two entities, then we need to create multiple correlation table between them. In a graph database, we only need to indicate the existence of a different relationship between the two, for example by pointing to the film's director DirectBy relations, or relations with ActBy to specify various actors involved in filmmaking. While ActBy relationship, we can show that it is starring in the movie is the relationship property. And can be seen from the name of the relation shown above, the relationship is directed. If you want to build a double set between two nodes to the relationship, we need to define a relationship for each direction.

In other words, with respect to the relationship between the relational database tables associated with a variety of graphical database may be able to contain attributes this by providing a richer relationship to show the way relations. Therefore, compared to the relational database, graphical user database of things in the abstract it will have an additional weapon that rich relationship.

 

 

Therefore, when you define the data to show the graphic database, we should be in a more natural way to abstract the need to show these things: first of all for these nodes define its corresponding set of things, and defines the node set the having individual properties. Next, identify the relationship between them and creates abstract these relationships.

   Thus a pattern of data carried in the database will eventually have a structure similar to that shown in the figure:

 

 

After learning the basics of graphics database, we will begin to try to use a graphical database. First we have to figure out a problem, and that is how our definition of a well-designed graphic database of drawing? In fact, this is not difficult, you only need to know the number of elements that can map database designed to be used.

The first is, FIG distinguish between nodes interconnected set of nodes and relationships. In the design is based on a relational database in the past, we often use a table to a class of abstract things. As for the people of this concept, we often abstract a table and add two records indicate, in the table Alice and Bob:

 

 

In FIG database, where two concepts corresponding to: set the node and the node. Under normal circumstances, the graphic display data in the database do not use node set, but an independent node:

 

 

 

And if you need to add support for books in the figure, these books will still be represented as a node:

 

 

In other words, although the concept has often set of nodes in a graph database, but it is no longer a map database of the most important abstract way up. Even from some graphics database has allowed software developers to use the Schemaless nodes that point of view, they have the concept of Node Set weakened. In turn, we think it should be the point of view of individual nodes, as well as a series of relationships that exist between these individuals.

So we can not just define each node has the data it? no. The most common one criterion here is: schemaless This flexibility can be an advantage for you. For example, compared to a strongly typed language, weakly typed language can lead to greater development flexibility for software developers, but its maintenance and rigor often not as strongly typed language. Similarly, when using Schemaless node must combine flexibility and maintainability.

So that we can add a variety of relationships in the node, rather like that you do not need to worry about whether you need to change the database through the relational database to record the number of foreign keys Schema. This in turn allows software developers to add a variety of relationships among the nodes:

 

 

 

 

 

 

Therefore, in a graph database, node set this concept is not the most important of the kind of concept. For example, in some graphic database, each node ID in accordance with the set of nodes are not organized, but according to the order of creation of the nodes to impart. When debugging, you may find that the first node in a node set ID is 1, ID is the second node 3 a. The node having the ID 2 is another node in the set.

Described above for the content, the content storage is actually a source or a class map database, the contents of which are linked, and corresponding to the degree of penetration, thereby indicating a direction of the drawing points, which content priority, these points and a one side connected together to constitute a schematic diagram. Thus this figure is actually contemplated FIG, it is set out in FIG assumed, in fact, still a data strip, but because this can not store data in a relational database, and therefore such a database to store data in FIG. Not able to see such a map database. Currently nine data sets have been uploaded to the server, as long as the program is running, when the establishment of SPQRAL disconnect it and these data sets for docking, ready to use.

FIG database content portion displayed:

University class <http://dbpedia.org/ontology/University> dbpedia 10748

PrimeMinister class <http://dbpedia.org/ontology/PrimeMinister> dbpedia 1581

IceHockeyLeague class <http://dbpedia.org/ontology/IceHockeyLeague> dbpedia 127

Olympics class <http://dbpedia.org/ontology/Olympics> dbpedia 52

MusicFestival class <http://dbpedia.org/ontology/MusicFestival> dbpedia 604

ShoppingMall class <http://dbpedia.org/ontology/ShoppingMall> dbpedia 1730

GrandPrix class <http://dbpedia.org/ontology/GrandPrix> dbpedia 721

Game class <http://dbpedia.org/ontology/Game> dbpedia 1136

Senator class <http://dbpedia.org/ontology/Senator> dbpedia 901

Muscle class <http://dbpedia.org/ontology/Muscle> dbpedia 276

Gnetophytes class <http://dbpedia.org/ontology/Gnetophytes> dbpedia 27

SpeedwayLeague class <http://dbpedia.org/ontology/SpeedwayLeague> dbpedia 7

Monarch class <http://dbpedia.org/ontology/Monarch> dbpedia 1517

Saint class <http://dbpedia.org/ontology/Saint> dbpedia 2344

AmericanFootballTeam class <http://dbpedia.org/ontology/AmericanFootballTeam> dbpedia 32

Bird class <http://dbpedia.org/ontology/Bird> dbpedia 12334

Reptile class <http://dbpedia.org/ontology/Reptile> dbpedia 5737

Airline class <http://dbpedia.org/ontology/Airline> dbpedia 2457

Album class <http://dbpedia.org/ontology/Album> dbpedia 94033

Protein class <http://dbpedia.org/ontology/Protein> dbpedia 1689

Activity class <http://dbpedia.org/ontology/Activity> dbpedia 1234

FilmFestival class <http://dbpedia.org/ontology/FilmFestival> dbpedia 165

Currency class <http://dbpedia.org/ontology/Currency> dbpedia 313

Lake class <http://dbpedia.org/ontology/Lake> dbpedia 8174

Park class <http://dbpedia.org/ontology/Park> dbpedia 847

GridironFootballPlayer class <http://dbpedia.org/ontology/GridironFootballPlayer> dbpedia 15284

CollegeCoach class <http://dbpedia.org/ontology/CollegeCoach> dbpedia 3520

Website class <http://dbpedia.org/ontology/Website> dbpedia 1852

Lymph class <http://dbpedia.org/ontology/Lymph> dbpedia 81

Settlement class <http://dbpedia.org/ontology/Settlement> dbpedia 239630

Ontology class <http://www.w3.org/2002/07/owl#Ontology> dbpedia 1

President class <http://dbpedia.org/ontology/President> dbpedia 2105

Enzyme class <http://bio2rdf.org/ns/kegg#Enzyme> kegg 4245

Property class <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> drugbank 117

targets class <http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/targets> drugbank 4553

SoccerLeague class <http://dbpedia.org/ontology/SoccerLeague> dbpedia 168

Species class <http://dbpedia.org/ontology/Species> dbpedia 146082

Judge class <http://dbpedia.org/ontology/Judge> dbpedia 911

Moss class <http://dbpedia.org/ontology/Moss> dbpedia 331

EducationalInstitution class <http://dbpedia.org/ontology/EducationalInstitution> dbpedia 31297

AnatomicalStructure class <http://dbpedia.org/ontology/AnatomicalStructure> dbpedia 3851

Comedian class <http://dbpedia.org/ontology/Comedian> dbpedia 622

Congressman class <http://dbpedia.org/ontology/Congressman> dbpedia 1922

Device class <http://dbpedia.org/ontology/Device> dbpedia 19626

Thing class <http://www.w3.org/2002/07/owl#Thing> dbpedia 1477796

Musical class <http://dbpedia.org/ontology/Musical> dbpedia 1010

Bacteria class <http://dbpedia.org/ontology/Bacteria> dbpedia 163

SoftballLeague class <http://dbpedia.org/ontology/SoftballLeague> dbpedia 1

AdministrativeRegion class <http://dbpedia.org/ontology/AdministrativeRegion> dbpedia 67005

PlayboyPlaymate class <http://dbpedia.org/ontology/PlayboyPlaymate> dbpedia 652

Model class <http://dbpedia.org/ontology/Model> dbpedia 836

AmericanFootballLeague class <http://dbpedia.org/ontology/AmericanFootballLeague> dbpedia 69

SkiArea class <http://dbpedia.org/ontology/SkiArea> dbpedia 432

Place class <http://dbpedia.org/ontology/Place> dbpedia 413404

Single class <http://dbpedia.org/ontology/Single> dbpedia 32937

VolleyballLeague class <http://dbpedia.org/ontology/VolleyballLeague> dbpedia 27

River class <http://dbpedia.org/ontology/River> dbpedia 18412

Book class <http://dbpedia.org/ontology/Book> dbpedia 20490

EthnicGroup class <http://dbpedia.org/ontology/EthnicGroup> dbpedia 2534

Beverage class <http://dbpedia.org/ontology/Beverage> dbpedia 488

SportsEvent class <http://dbpedia.org/ontology/SportsEvent> dbpedia 2656

FictionalCharacter class <http://dbpedia.org/ontology/FictionalCharacter> dbpedia 8635

Planet class <http://dbpedia.org/ontology/Planet> dbpedia 12348

Chancellor class <http://dbpedia.org/ontology/Chancellor> dbpedia 85

Language class <http://dbpedia.org/ontology/Language> dbpedia 3059

Fungus class <http://dbpedia.org/ontology/Fungus> dbpedia 6960

Mountain class <http://dbpedia.org/ontology/Mountain> dbpedia 8479

Airport class <http://dbpedia.org/ontology/Airport> dbpedia 9520

LacrosseLeague class <http://dbpedia.org/ontology/LacrosseLeague> dbpedia 13

Magazine class <http://dbpedia.org/ontology/Magazine> dbpedia 2182

Monument class <http://dbpedia.org/ontology/Monument> dbpedia 3

PopulatedPlace class <http://dbpedia.org/ontology/PopulatedPlace> dbpedia 310970

............................................................................................................................................

.............................................................................................................................................

Third, the  Summary section:

Database design and demand are closely linked, before the database design, requirements documents are not necessarily required to complete, at which time we must define their needs, demand will only be able to clear up a good database design. In use , when powerdesigner should pay attention to the relationship between the entities cdm, note-many or many-to-many or. When designing a table using foreign key relationship, if it is to be established Asscocaition-many relationship to design. The design of the database and with reference also need to design the prototype of FIG, more convenient time in accordance with these developers to make the design of the database during development. Database design is not a simple thing to do very well prepared, especially when creating tables, we must consider in detail the primary key attribute domain constraints and other issues in these tables, but also need to pay attention to tables and table the relationship between problem.

While learning the knowledge of the database, but there will be many problems in time are really doing, so all knowledge only better able to grasp more good by going to use is. This is the first step to understand by doing it. The entire design process, the group will open a lot of times, conducted in-depth exchanges and discussions to learn, and teachers also discussed the consultation. Feel good after a good design is not one person can easily complete, it is important that we work together, it must be the brainchild of everyone working together efforts.

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/990203ok/p/11823988.html