[Spleb] Database Design

Source: Internet
Author: User
I would like to discuss with you how to design a database. More specifically, it is not about the principles of database design, but about the design of a database in Engineering. I am a beginner. I have never participated in standard projects. I have worked on a micro-project that I have chosen by myself. I have been exploring for a while. The following is a database design for spleb. Please criticize and advise me.

My Database Design Methods
I. data entities: list all data entities
Ii. Data clarification: what data objects should contain
3. Data entity relationship diagram: Relationship between data entities
4. Data Table: database schema table

Example: (the database is small, there are very few data entities, and no relational diagram is made)

SplebDatabase Design

I,Data entity

1,System settings (Config)

2,Data Source, database (Database)

3,Template (Template)

4,Template information (Templateinf)

II,Data entity details

1,System settings (Config)

(1)Business Data: namespace (Namespace)

(2)Logical Data: Primary Key (Configid)

2,Data Source, database (Database)

(1)Business Data: Database Name (Databasename), Connection string (Connectionstring), Database Type (Databasetype), Ing information file name (Classmapfilename), The Last Time (Lasttime)

(2)Logical Data: Primary Key (Databaseid)

3,Template (Template)

(1)Business Data: Template Name (Templatename), GenerateCodeLanguage (Language), The main template file name (Mainfilename), Description (Description), Template usage (Buildtimes), The Last Time (Lasttime)

(2)Logical Data: Primary Key (Templateid)

(3)Associated data entity: Template Information

4,Template information (Templateinf)

(1)Business Data: Template content (Content), Template file name (Filename)

(2)Logical Data: Primary Key (Templateinfid)

(3)Link data: Corresponding template primary key (Templateid)

(4)Associated data entity: Template

III,Data Table

1,System settings (Config)

Data name

Field name

Data Type

Remarks

Primary Key

Configid

Primary Key

 

Namespace

Namespace

Text

 

2,Data Source, database (Database)

Data name

Field name

Data Type

Remarks

Primary Key

Databaseid

Primary Key

 

Database Name

Databasename

Text

Not empty

Connection string

Connectionstring

Long text

 

Database Type

Databasetype

Text

Optional values:

MSSQLServer,Msaccess,

Oracle

Ing information file name

Classmapfilename

Text

Not empty

Last use time

Lasttime

Time

 

3,Template (Template)

Data name

Field name

Data Type

Remarks

Primary Key

Templateid

Primary Key

 

Template Name

Templatename

Text

Not empty

Code language generation

Language

Text

Non-empty, possible values

C #,VB

Main template file name

Mainfilename

Text

Not empty

Description

Description

Long text

 

Template usage

Buildtimes

Integer

Not blank, default0

Last use time

Lasttime

Date

 

4,Template information (Templateinf)

Data name

Field name

Data Type

Remarks

Primary Key

Templateinfid

Primary Key

 

Template

Tmplateid

Foreign key

Not empty

Template content

Content

Long text

 

File Name

Filename

Text

Not empty

 

 

Yuandong

2006-1-31

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.