Working with Database is something I am yet to explore. It’s always good to learn basics before you get into details. Here are few best practices/do’s and don’ts while creating database:
· Chose the most appropriate data type while creating the table.
· Create appropriate constraints wherever applicable while creating the table.
· Use SQL loader to import data from some other data source wherever possible.
· Always use anchored declaration while creating stored procedures and functions.
· Carefully select the control structures.
· Wherever applicable use bind variables.
· Create appropriate triggers to implement business logic.
· Always store the scripts in the text files.
· Declare appropriate mode for variables in stored procedures and functions.
· The input and output parameters datatype should be SQL compatible while creating stored functions.
· Always handle errors using exception handling construct wherever applicable.
Though I haven’t got time to dig into details of creating a database, I think this stuff will be somewhat useful.