1.c.j.date 12 caveats about distributed databases
-
The independence of the local site. Each local site has an autonomous, centralized DBMS, each of which must ensure security, concurrency control, backup, and recovery
-
Center site. Sites in the network are not related to the central site or other sites, and all sites have the same functionality
-
Fault independence. A node failure does not affect the system, i.e. one node fails and the system continues to run
-
Location Transparent. When users retrieve data, they don't need to know where the data is
-
Split Transparent. Data segmentation is transparent to the user, the user can only see a logical database, when the user retrieves the data segmentation, do not need to know the database partition name
-
Copy Transparent. Users only see a logical database, DBMS transparent selection of database segmentation, for the user, DBMS transparent management so split
-
Distributed queries. Queries may run in different DB stations, and the DBMS transparently implements query optimization
-
Distributed transaction Management. A transaction may update data at different sites, and the DBMS transparently implements transaction management
-
Hardware independence. The system must be able to run on any hardware platform
-
Operating system independence. The system must be able to run on any operating system platform
-
Network independence. The system must be able to run on any network platform
-
Database independence. The system must support any vendor's product database
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5C/0A/wKiom1UZPfqCLbe4AAHr1YAgtnA062.jpg "title=" dp.png "alt=" Wkiom1uzpfqclbe4aahr1yagtna062.jpg "/>
2. Database Design Strategy
The two classic methods of database design are: top-down design, bottom-up design.
Top-down design: Identify the data set first, then define the data elements for the collection, which will go through the entity identification to the entity's attribute definition.
Bottom-up design: First define the data element items and then combine them into datasets, which go through the attribute definition to group into entities.
These two approaches complement each other, making choices based on business scenarios and development experience, typically with a small number of entities, attributes, and relational databases that can focus on the bottom-up approach. If the database is more complex, consider using a custom-up approach.
According to personal experience, it is very seldom to use bottom-up method, but when the data set is relatively large, more or less use the idea of the method, such as extracting some properties, the initial combination of some entities for subsequent analysis use.
3. About naming in the database
Perhaps a more restrictive naming convention can be a headache, even for a table or attribute name Concise Incredibles, but it is true that the benefits of such constraints will make people become a loyal fan of naming conventions.
-
Use descriptive words to name tables, attribute names, manage relationships, and more
-
Compound entity naming can often describe the relationship that is represented
-
Avoid database system keywords as named names
-
All naming rules are unified
4. Main code (database table primary key) selection principle
| Main code Features |
Describe |
| Uniqueness |
Uniquely identifies an entity instance (a record of a database table), and the value cannot be null |
| Non-intelligent (with no specific semantics) |
No actual semantics (e.g. student number), semantic attributes are more suitable for describing entity features |
| Does not change over time |
such as name, marital status, address, mobile phone number, etc. may change, should choose permanent unchanged |
| Best Single attribute |
Not required, but best, single attribute simplifies the implementation of foreign keys and application coding |
| Preferably a numeric type |
Numeric type for easy management, easy to count the database, self-increment and other functions |
| Secure Code |
There can be no security risk, such as the identity card number as a live code may be detected by the collision data |
This article is from the "Red Horse Red" blog, please be sure to keep this source http://aiilive.blog.51cto.com/1925756/1663448
[Note] Database system design naming and primary key selection