Thursday, December 1, 2005

How To Say Congratulations Pregnant Couple

not confess to torture by the data: Standards for the design of databases

In Search of a Standard Model Database design

I've always been criticized for keeping my neutral position with regard to design, model selection, patterns, styles and prototypes of all that concerns the programming and databases.
But this time I break a little ice proposing a "standard" for modeling databases.
is not the objective at this time to select a database, which will at a later time.

But first assume that already have a basic knowledge of databases, especially in regards to standards, and has worked at least one database.

is unlikely that anyone has ever wondered why the title, if it is a great background in the world of databases, possibly identify the following quote:

Datamining: The art of torturing the data until they confess

But how could "confess" a poorly organized and structured data? An almost impossible task.
After experimenting with several proposals of different authors, models and "standards", I venture to propose a somewhat risky and daring, and for many counterproductive and abusive, wanting to clarify that my goal is not to say that is a panacea or a statement that must be taken immediately, it is simply a given that everyone will be implemented as deemed. As
develops different entities or tables, with the main problem that I faced is to make / maintenance is the allocation of names to the tables and their fields.
There are several proposals to designate names for tables and fields, which I list below, in addition to presenting the pros and cons of each.
Notation 1:
Rules:
  • The name of the table must have a maximum of 12 characters and all letters must be uppercase. (Ex: Student)
  • The first three letters of each field must refer to the table, followed by a dash of ground or soil (_) and then three characters to indicate the contents of the field, and all characters must be capitalized. (Eg EST_COD, EST_NOM, EST_APE, EST_DIR)
Advantages:
For your time ofrececía main advantage was that due to the limitation that had the MS-DOS and similar files only up to 8 characters guaranteed that the name always would be valid. It never applied to databases on Unix or similar. SQL Code
very short and relatively easy to modify
Disadvantages:
may occur if two fields may have very similar names and complicate the maintenance of the tables
Notation 2:
Rules:
  • All table and field names are capitalized
  • The name of the table should be the least amount of characters and this is all the vowels deleted. There are only two exceptions to this rule. The first if the word starts with a vowel, and the second, when the vowels of last syllable is meaningful or can clarify the word (eg, ESTDNTE)
  • The field names must start with three characters, corresponding to the table where they belong or, in the case of foreign fields, the name of the master table (Ex: EST_CDGO, EST_NMBRE, EST_APLLDO CIU_NCMNTO)
Advantages:
organized tables and fields, where you can define the data source in the case of foreign fields.
Disadvantages:
resulting SQL code extremely complex and confusing, due to the possible similarity between words, they contain no vowels difficult to read and well maintained appropriate database
Basically, these are the notations used or perhaps have been the basis for many others, which require a treatise to explain and expose the right way. Then I shall
two proposals which are very similar but mutually exclusive, as you will note below, but are intended to provide an alternative to current design standards, design and development of databases.

Start with a common basis for both proposals: Proposal

design and conventions for databases:

  • The names of both entities and attributes (tables and fields) must be written in capital letters. Characters may be used [AZ] [az ][_][ 0-9]: This is done because of various limitations of databases particularly old, so you should avoid using special characters for compatibility, but if you have a database with support for different encodings exist, of which I personally recommend the UTF-8, since it is universal and is governed by the UNICODE standard. I recommend that you use special characters, and these greatly facilitate the reading of each of the sentences, but must take into account each of the limitations of databases and especially changes that generate SQL statements, therefore, wear but considering that this requires minor changes in the generation and special creation of SQL queries.
  • The name of an entity or a field can not start with numbers: Although at present it is possible, you should not even think it does not show any case where required, if any, would love know, but until that happens, you should not do.
  • The name of the entity or field, in the event that is composed of two or more words, they must be separated by an underscore (eg personal_departamento)
  • An entity name can be composed of two parts: a prefix of some characters that indicates the scope of use of the company or its principal membership either a subject or module and a name that represents the identification of the entity, united by an underscore
  • For any case the names of the fields or entities, should ensure that they are not too extensive, leaving aside the expressiveness and
  • clarity
  • names names of entities and fields should be written in the singular and for them to avoid the use of verbs
  • fields that are key primary entity must be denoted with the prefix or suffix ID, and the name of the entity without prefix (if any) joined by an underscore preferably.
  • foreign key fields and primary keys with which they relate should be of the same name, except when an entity has more than one foreign key to the same primary key. In this case will be an appropriate name that represents the relationship.
  • Boolean fields but should be avoided by using lists, if any, should be in a participle in the case of verbs or use any prefix or suffix that identifies them as such, separated by an underscore

But regardless of any theory, standard or rule, the general rule for the development, design and implementation of databases is in a primitive simple enough.

If anyone who sees the design can define the operation, logic and meaning of each of the entities and their relationships can be considered that the work has been completed successfully

Thursday, October 13, 2005

Lucasville Ohio To Cincinnati

bullish on a walk and you will fly head: What language to use?

The dilemma of choosing a programming language

Just before starting this blog was thinking of that famous phrase describing C + +: C

gives you shoot in the foot. C + + makes it difficult, but when you do, you blow the whole leg. (Bjarne Stroustrup)

This in turn reminds me of an email I ever got from a friend refers to this last decision, which I wish to share with all Internet.

Description Language accidentally FORTRAN USING )))))) Pie.h pie.c
task at
shot in the foot
C you shoot in the foot.
C + + You create dozens of operators to yourself and all you get shot in the foot.
you shoot on every finger of foot iteratively until you run out of fingers, then up and READ NEXT REPEAT. If you run out of bullets, you continue shooting attempts, as there are no exceptions handling capabilities.
Pascal compiler does not let you shoot in the foot.
Ada: After correctly packing your foot, while trying to load the gun, pull the trigger, aim and nonsense in the foot. When I try to find out that you can not because your foot is the wrong guy. COBOL
a COLT 45, says in PIERNA.PIE REVOLVER, THEN put in COLT.GATILLO BRAZO.MANO.DEDO, press and SOARS. COLT CARTRIDGE THEN RETURN. ZAPATO.CORDON CHECK if need be attached.
LISP (I shoot in the appendix holds the gun with that ((I shoot in the appendix holds the gun with which (((I shoot in the appendix holds the gun with which (((( I shoot in the appendix holds the gun with which ((((( you shoot in the appendix that keeps the gun with which you shoot (((((( in Appendix (...)
FORTH foot shooting himself.
Prolog You tell your program you want to shoot in the foot. The program argues how it does, but do not understand the syntax.
BASIC: nonsense in the foot with a water gun. In large systems, continue until the water covers the entire body.
Visual Basic: really only think you've shot in the foot, but you have so much fun that really does not matter if you shoot or not.
Hypertalk: Put the first bullet revolver the foot of the left leg. Answer the result.
Motif You spend days writing a UIL description of your foot, the bullet, its trajectory and intricate drawings of the ivory-handled revolver. But when you are about to pull the trigger, the gun jams. APL
you shoot in the foot, but you spend all day thinking you could have repented with fewer characters. SNOBOL
If you had success, madness in his left foot. If it fails, nonsense in the right foot. Unix
% ls dedo.o dedo.c dedo.o% rm *. O rm:. Or

No such file or directory% ls%

Concurrent Euclid You shoot on any member instead of the foot. 370
JCL You walk down the MIS and include a 400-page document detailing exactly how you want to shoot. Three years later, your foot back absolutely fried.
Paradox Not only can you shoot in the foot, your users do too. ACCESS
trying to aim the gun on your foot, but eventually manages to shoot holes all Borland distribution diskettes. Assembler
Trying shoot in the foot only to discover that you must invent the revolver, the bullet, the trigger and foot.
Modula2 After realizing that it is impossible to do with this language, you shoot in the head

Despite being a text burlesque and a bit humorous, fun presents the reality of different existing programming languages. But we go to analyze the pros and cons of each one of the most popular languages important today. Language

Features C + + has all the power
C most powerful language in the history, language is not considered a very high level, and this gives it much of the power he possesses. It is ideal for the development of low-level programs such as operating systems, BIOS, and other compilers, because the binaries are quite small and optimized (up to the programmer). Moreover, in theory, can interact with virtually any other programming language, compiler or program.
C but with an added value, the POO , which allows us to give greater organization to the software, making it an excellent language convierrte for the development of high-level software. FORTRAN
Although I accept that I am not a guru of this language, we can say that this powerful language almost obsolete, is ideal for the development of scientific systems, for all its structure and philosophy allow. Pascal
My favorite. As an advertising campaign read some of Borland: All
ease of BASIC with the power of C + + language is

highly didactic ideal for teaching, it is quite orderly. Although for some it is an advantage that this language has strict data types, for this is quite annoying but irrelevant debating this issue, which can be explained in another topic later. Great for almost everything.
BASIC language is unstructured, impractical to develop software. I do not recommend, and indeed is practically extinct as such. Currently there are versions and adaptations such as VisualBasic in different flavors.
As VB would say once: Visual BASIC
makes the programmer does a real expert novice and the expert in complete useless.
is very useful for the rapid development of graphics applications with simple interfaces. Although you can build systems rather "robust" is not practical for application development really powerful, has too many dependencies that make the application on a machine to consume computer resources.
Assembler Language mightiest of all, rarely used by programmers today, so instead the electronics, because this language allows us to handle the PC at the lowest possible level, manipulating its structure and programming.
This language can be dangerous if you do not know how to use or otherwise is well known. An example of this is the "true virus", or who could forget the legendary NATAS-BOOT, viruses that were a true work of art, thanks to advanced knowledge of the language that had the programmer.
Ideal (read necessary) for programming operating systems and compilers that require access to low-level PC.

Although you may have noticed I have not mentioned a number of existing languages, I do it because these are perhaps the most popular and commercial. The differences lie in details that are not worth exposing for now. But in the end
account, what is the best language?.
R. / There is no better language.
But how come no one is the best!, Senciallamente, because each language was designed with a specific purpose, and even today many languages \u200b\u200bsuch as Delphi, C #, and VisualBASIC.Net offer great facilities for development of each has its own unique characteristics, as well it should be noted that this is according to the programming style used.
not want to tip to use language X or e, it is not my purpose, but for those who want to know which language to use fear to say that varies according to need, although as I explained above Pascal is my favorite, I accept that currently do not use it. Instead use derived versions of it, including: Delphi, Kylix, FreePascal, Lazarus, etc. and even in spite of everything, none of the above use cases, as they also use VB in its different forms, depending on the need, Assembler, C / C + + / C # and others which are not worth mentioning. So just ask him to do the same, which surely will bring much satisfaction.