Monday, March 19, 2012
Database distribution
I am going to distribute a webb site and need to distribute the databases used by this webbsite. A newbie as I am to databases I ask if there is any tool to extract the databases from my machine, store it on a CD and then install it on another machine.
Thing is... I want to distribute the databases, but not the data currently stored in it.
Gudday!1. No such a tool as I know.
2. Backup your database and restore it with different name.
3. DROP TABLEs unusable to user (all user tables), analytic tables ...
4. In this database, use DELETE/TRUNCATE TABLE statements (See BOL) to clear your tables. If you use some tables for configuration, you cannot delete them !!!
5. Select distribution type BACKUP/Script. Script (made for example by EM) is most version compatible, but it takes some time to create it, if you distibute also data.
6. BACKUP installation files for testing UPGRADE.
7. Installation of database on user side can be done by runing script by isql.exe by installation program ( most use InstallShield )
8. Installation is a nightmare of each advanced developer:mad:|||Is it possible to use method of detaching the database, copy the files, distribute files and finally attach the database on remote site?
// Dobaz|||I have a similar situation in my company.I had gone for creating the scripts of the database ,since i also needed the data in the database, the size of the database file was too big .
if u script the database u have total control over it .|||You can use a outer program to restore the database during the installitaion or the program's first running.|||Thanks for all replies and help!
I have tried to:
1. Detached the databases that needs to be distributed from the SQL Server on my original machine.
2. Copied the .mdf and .ldf files from the MSSQL data folder onto a second machine.
3. Attached the distributed databases to SQL Server on the second machine.
It all seems to work ok between my own machines... Maybe this is a good way to go?
As I mentioned eariler I want to distribute the databases to keep table structure intact and only some example data stored in it (i.e. database files will be pretty small).
Friday, February 24, 2012
Database Design for Catalog Management
Hi,
I need advice on my design.
I'm developing a system that track the catalog distribution.
I have a 5 table.
Company Table - Store list of company. Each company can have many staff.
Staff Table - Store list of staff.
Catalogs Table - Store list of catalog. Each catalog can have many revision.
PKEY id
name
latest
CatalogsRev Table - Store list of catalog revision.
PKEY catalogID -> Catalogs.id
PKEY year
Staff_Catalog Table - Each staff can have many catalog revision.
PKEY staffID -> Staff.id
PKEY catalogID -> CatalogsRev.catalogID
PKEY year -> CatalogsRev.year
Is the above table good enough to track which company do not have latest catalog revision?
For the Catalogs Table should I use a trigger to update the Catalogs.latest column everytime a new CatalogsRev is entered?
I've read some article on the web says trigger is slow, but in my situation is it suitable to use trigger?
Thanks,
Max
Hiif u feel u r database satisifes 3rd normal form abs u r database is ok.SO u have to decide u r tables are going to satisify the normalization or not. Ok
U can write a trigger to modify the catalog information. Here u r modifying a column value i think it will not affect on performanace. I think so.
Thank u
Baba