Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Bases de datos > Firebird e Interbase
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 29-04-2005
mguixot mguixot is offline
Miembro
 
Registrado: may 2003
Posts: 102
Poder: 21
mguixot Va por buen camino
Base de datos en varios ficheros

Hola,
se que se puede dividir una base de datos en varios ficheros de tamaños concretos, pero me gustaría saber si es posible dividirla en ficheros, pero que estos contengan las tablas que nosotros queramos. Es decir, si tengo unas tablas con un caracter estático (por la informacion que almacenan) y otro tipo de tablas de caracter dinámicas, como hacer que las dinámicas esten en 1 o varios ficheros y el resto de tablas en otro/s ficheros?

Saludos y gracias
Responder Con Cita
  #2  
Antiguo 29-04-2005
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.038
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
juraría que no se puede
Responder Con Cita
  #3  
Antiguo 29-04-2005
bumiga bumiga is offline
Miembro
 
Registrado: sep 2004
Posts: 28
Poder: 0
bumiga Va por buen camino
Tomado de la ayuda de Interbase...

Cita:
A multi-file database consists of a primary file and one or more secondary files. You can create one or more secondary files to be used for overflow purposes only; you cannot specify what information goes into each file because InterBase handles this automatically. Each secondary file is typically assigned to a different disk than that of the main database. When the primary file fills up, InterBase allocates one of the secondary files that was created. When that secondary file fills up, another secondary file is allocated, and so on, until all of the secondary file allocations run out.
Whenever possible, the database should be created locally; create the database on the same machine where you are running ISQL. If the database is created locally, secondary file names can include a full file specification, including both host or node names, and a directory path to the location of the database file. If the database is created on a remote server, secondary file specifications cannot include a node name, as all secondary files must reside on the same node.

Specifying file size of a secondary file

Unlike primary files, when you define a secondary file, you must declare either a file length in pages, or a starting page number. The LENGTH parameter specifies a database file size in pages.
If you choose to describe page ranges in terms of length, list the files in the order in which they should be filled. The following example creates a database that is stored in four 10,000-page files, Starting with page 10,001, the files are filled in the order employee.gdb, employee.gd1, employee.gd2, and employee.gd3.

CREATE DATABASE "employee.gdb"
FILE "employee.gd1" STARTING AT PAGE 10001
LENGTH 10000 PAGES
FILE "employee.gd2"
LENGTH 10000 PAGES
FILE "employee.gd3"
LENGTH 10000 PAGES;

Note: Because file-naming conventions are platform-specific, for the sake of simplicity, none of the examples provided include the device and path name portions of the file specification.

When the last secondary file fills up, InterBase automatically extends the file beyond the LENGTH limit until its disk space runs out. You can either specify secondary files when the database is defined, or add them later, as they become necessary, using ALTER DATABASE. Defining secondary files when a database is created immediately reserves disk space for the database.

Specifying the starting page number of a secondary file

If you do not declare a length for a secondary file, then you must specify a starting page number. STARTING AT PAGE specifies the beginning page number for a secondary file.

The primary file specification in a multi-file database does not need to include a length, but secondary file specifications must then include a starting page number. You can specify a combination of length and starting page numbers for secondary files.

InterBase overrides a secondary file length that is inconsistent with the starting page number. In the next example, the primary file is 10,000 pages long, but the first secondary file starts at page 5,000:

CREATE DATABASE "employee.gdb" LENGTH 10000
FILE "employee.gd1" STARTING AT PAGE 5000
LENGTH 10000 PAGES
FILE "employee.gd2"
LENGTH 10000 PAGES
FILE "employee.gd3";

InterBase generates a primary file that is 10,000 pages long, starting the first secondary file at page 10,001.

Copyright © 1997 InterBase Software Corp. All rights reserved. Please obtain permission before copying InterBase help text.
Responder Con Cita
  #4  
Antiguo 30-04-2005
Avatar de Rufus
Rufus Rufus is offline
Miembro
 
Registrado: may 2004
Ubicación: Canarias
Posts: 193
Poder: 20
Rufus Va por buen camino
Bueno, bumiga, eso es justmente lo que ya le se ha dicho antes, que si se pueden crear varios ficheros especificando el tamaño, pero no especificando qué tablas quieres que vayan en cada uno.
__________________
Milo
Responder Con Cita
  #5  
Antiguo 05-05-2005
mguixot mguixot is offline
Miembro
 
Registrado: may 2003
Posts: 102
Poder: 21
mguixot Va por buen camino
Exclamation Base de datos grande dividida en varios ficheros

Bueno, después de intentar documentarme mucho más a fondo, me temo que no va a ser posible dividir una bbdd en ficheros y asignando en tiempo de diseño determinadas tablas a determinados ficheros.
Por otro lado, la idea de utilizar esto, es porque he desarrollado una aplicación de ventas, en la que la tabla de tickets, crece de manera importante, haciendo que una bbdd pueda ocupar a día de hoy 90MB aprox. Claro esto genera errores del tipo 'Out of memory' durante la ejecución de la aplicación.
En fin, si conoceis este problema o habeis oido hablar de alguna solucion para reducir considerablemente el tamaño de una bbdd, os agradecería que me lo comentarais.
1 Saludo y gracias.
Responder Con Cita
  #6  
Antiguo 05-05-2005
lbuelvas lbuelvas is offline
Miembro
 
Registrado: may 2003
Ubicación: Colombia
Posts: 377
Poder: 21
lbuelvas Va por buen camino
Hola foro,

No debe haber mayores problemas con el tamaño de tu BD, en produccion tengo clientes con BD cercanas a los 2GBytes y mas de 1.5 millones de registros.

Las dificultades estan de lado de algunos sistemas operativos (caso de Windows) donde un archivo no puede medir mas de 2 GBytes, en cuyo caso la BD debe ser fraccionada como indicó bumiga.

Tus errores pueden estar en el diseño de tu aplicacion, comentanos que tipo de operacion estas haciendo cuado se te presenta el error.
__________________
Luis Fernando Buelvas T.
Responder Con Cita
  #7  
Antiguo 05-05-2005
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.038
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Está claro que tienes un problema de otra índole y no tiene nada que ver el tamaño de la base de datos, 90 Mb es nada.
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 16:28:43.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi