Arquivo para Janeiro, 2006

Embedded Firebird e Microsoft SQL Server 2005 Express Feature Comparison

Isto é uma comparação básica e interessante da versão Firebird Embedded 1.5 e Microsoft SQl Server 2005 Express. De notar que se está a comparar a versão embedded do Firebird que não corre como um serviço, mas é completamente embedded na aplicação

embedded-firebird-and-microsoft-sql.html 

To summarize: Embedded Firebird is a clear win when you need a fully embedded database that users are not aware of. The clear advantages of Embedded Firebird are:

  • Licensing. You can’t beat Firebird’s open-source license that allows use in commercial applications without any viral effect (i.e. no need to open your proprietary code). Any kind of a “free redistribution” license is just too far from that.
  • XCOPY Data Deployment. A Firebird database is a single file. Just copy it somewhere on disk and open it. Compress it and send it by e-mail. Use your own file extension and associate it with your application.
  • XCOPY Runtime Deployment. Not only the data but the runtime (which is a single DLL and optional supporting files) can be just copied to your application’s directory.
  • Runtime size. Compare the SQL Express 36 MB download with the 2 MB Firebird runtime.
  • No performance limitations. With Firebird you can have a database of any size and open multiple connections without any penalty.
  • Real embedding. Users and administrators don’t need to be aware that your application is using Embedded Firebird because it is only accessible from your application.

Deixe um comentário

Extraindo metadata de um banco Firebird

isql -extract -o [nome arquivo] [banco de dados]Exemplo:

isql -extract -o metadata.sql banco.fdb

Onde metadata.sql é o arquivo que será gerado, e banco.fdb é meu banco Firebird supondo que ele está no diretório actual. Claro que a pasta bin do Firebird tem que estar no path, pois é lá que o isql se encontra.

Uma das utilidades deste recurso é por exemplo incluir no seu build a extracção de metadata e atualização deste no controle de versão.

http://www.ericksasse.com.br/?p=224

Deixe um comentário

Advanced Data Generator 1.6.0

The Advanced Data Generator is a powerful tool that cannot be missed in any database developers toolbox, the Advanced Data Generator allows you to easily generate real-life like data into your database or SQL scripts for testing purposes. With user-defined presets, complex value support and the included data-libraries, you will have a huge database up and ready for testing in no-time.

http://www.upscene.com/index.htm?./news/20060127.htm

Deixe um comentário

Evitando corrupção da base de dados

As razões possíveis em que pode ocorre a corrupção da base de dados:

  • Servidor mal encerrado (ex.: falha eléctrica)
  • Falha de hardware (disco rigido, ..)
  • Acedendo a um ficheiro da base de dados quando o servidor está a correr e a usa-lo
  • Disco cheio
  • FAzendo o restore de uma base em execução
  • permitindo q utilizadores se liguem durante um restore
  • Modificação directa das tabelas de Metadata

http://www.dotnetfirebird.org/


How to corrupt a database


Interbase and Firebird database recovery guide


Interbase and Firebird errors and their reasons

Deixe um comentário

Excepções

Excepções são mensagens de erro definidas pelo utilizador, escritas especificamente para a base de dados e armazenadas na base de dados para usar em Stored Procedures e Triggers.

Podem ser partilhadas por diferentes modulos de uma aplicação, ou mesmo diferentes aplicações que partilham uma base de dados. Oferecem um modo simples de padronizar o tratamento de erros preprogramados.

  • Create: CREATE EXCEPTION name “message“
  • Alter: ALTER EXCEPTION name “message“
  • Drop: DROP EXCEPTION name

Deixe um comentário

Funções e funções e…

System Functions
==================
DATABASE( )
IFNULL(exp, value)
USER( )
==================
String functions
==================
ASCII(string_exp)
BIT_LENGTH(string_exp)
CHAR(code)
CHAR_LENGTH(string_exp)
CHARACTER_LENGTH(string_exp)
CONCAT(string_exp1, string_exp2)
DIFFERENCE(string_exp1, string_exp2)
INSERT(string_exp1, start, length, string_exp2)
LCASE(string_exp)
LEFT(string_exp, count)
LENGTH(string_exp)
LOCATE(string_exp1, string_exp2[, start])
LTRIM(string_exp)
OCTET_LENGTH(string_exp)
POSITION(character_exp IN character_exp)
REPEAT(string_exp, count)
REPLACE(string_exp1, string_exp2, string_exp3)
RIGHT(string_exp, count)
RTRIM(string_exp)
SOUNDEX(string_exp)
SPACE(count)
SUBSTRING(string_exp, start, length)
UCASE(string_exp)
==================
Numeric functions
==================
ABS(numeric_exp)
ACOS(float_exp)
ASIN(float_exp)
ATAN(float_exp)
ATAN2(float_exp1, float_exp2)
CEILING(numeric_exp)
COS(float_exp)
COT(float_exp)
DEGREES(numeric_exp)
EXP(float_exp)
FLOOR(numeric_exp)
LOG(float_exp)
LOG10(float_exp)
MOD(integer_exp1, integer_exp2)
PI( )
POWER(numeric_exp, integer_exp)
RADIANS(numeric_exp)
RAND([integer_exp])
ROUND(numeric_exp, integer_exp)
SIGN(numeric_exp)
SIN(float_exp)
SQRT(float_exp)
TAN(float_exp)
TRUNCATE(numeric_exp, integer_exp)
==================
Time and date functions
==================
Function Description
CURRENT_DATE( )
CURRENT_TIME[(time-precision)]
CURRENT_TIMESTAMP[(timestamp-precision)]
CURDATE( )
CURTIME( )
DAYNAME(date_exp)
DAYOFMONTH(date_exp)
DAYOFWEEK(date_exp)
DAYOFYEAR(date_exp)
EXTRACT(extract-field FROM extract-source)
HOUR(time_exp)
MINUTE(time_exp)
MONTH(date_exp)
MONTHNAME(date_exp)
NOW( )
QUARTER(date_exp)
SECOND(time_exp)
TIMESTAMPDIFF(interval, timestamp_exp1, timestamp_exp2)
WEEK(date_exp)
YEAR(date_exp)
==================

Comentários (1)