Home > database >  Consult your database a great god, and how to design the table is more suitable for this business?
Consult your database a great god, and how to design the table is more suitable for this business?

Time:09-24

business is introduced: like baidu encyclopedia
Now need to build an information database, hypothesis is divided into three main subjects: [people] [things] [object];
Each subject correspond to individual attributes, but there are a few common properties, such as:

three main public attributes:
Name - alias records and monthly - area - image - video - profile - note;

Three main body personality attributes:
People: character types - sex - age - birth - nationality - position - experience - work, etc.
Source: type - events - level - associated characters - correlation information, etc.
Objects: item types - level - objects labeling, etc.

Business main requirements:
1, need frequent fuzzy search by [public attribute] three main content;
2, according to the total amount should not millions;

questions:
Different types of 1, to build a table, with three main body, the lateral expansion of the subject property, so there will be a lot of empty fields, but easy to query;
2, build three tables, are not free field, but the query is very trouble;
3, three tables, associated with a public property sheet? Apparently did not to do so?

Database genuflect is begged god put forward reasonable Suggestions, thank you,

CodePudding user response:

No more than million, a piece of table, built the index, query quickly

CodePudding user response:

Three main public property, common property, just the same domain section name, is a completely different concept, so making a base table is meaningless, unless you really have only based on the requirement of this table).

Started their four tables:
What
Things belong to (one-to-many, direct foreign key point)
The relationship between man and things table many-to-many
  • Related