Database schema design for MySQL, suggestions? -


so, have chance first "real" database, thinking myself should think about... suggestions?

  • select db (using mysql)
  • select db engine based on needs (using mysql, know myisam vs innodb)
  • create table documention db using
  • column definition (select right datatype)
  • model data normalized
  • referential integrity: primary key (natural or surrogate); composite keys; foreign key

which leads me main question, how know if database success @ fit enough?

as listing general questions need answered in order go idea working system i'll propose important organize them into

1) logical design (get clean model represents problem space trying model)

2) physical design (which rdbms , storage engine, exact data types, other practical , performance related decisions)

you doing of mixing between two. when clean logical model , know relationships between entities modelling physical modelling not hard.

edit: there many books deal steps of logical data design, try to:

  1. define use cases , business requirements (things pretty soft still, check requirements contradictions; done interviewing people know business process well, can degenerate discussion yourself)
  2. get list of attributes , entities used across system , define them (data dictionary)
  3. determine domain of attributes (which, later @ physical level can accomplished data type, check contraint or referring 'helper' table, don't worry yet, make sure define domains well)
  4. draw er/uml diagrams defining relationships - define tables in terms of primary keys, foreign keys , other attributes (this time aim completeness); step can done using cam , decent diagramming tools spit out create database scripts diagrams
  5. examine model in search denormalized data (should normalized already, when translating problem space logical model possible make mistakes , discover have redundancy or other anomalies)

a few of these steps need go , forth consider different ways of accomplishing tasks. example including new attributes might make go , analyze new use case. or discovery of contradicting requirement might lead discovery of whole new entity. or discovering redundancy might lead discovery of undocumented process exists (and justifies, or rather, explains percieved redundancy redefining seemingly duplicate attribute). etc...


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -