please give me suggestions for my database

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
aaaphp000000
Forum Newbie
Posts: 22
Joined: Mon Aug 29, 2005 5:39 am

please give me suggestions for my database

Post by aaaphp000000 »

hi,
I create several tables in a mysql database, they are not used now because i need more knowledges of database modifications (i know "backup" first).

my questions:
is it harmful to existing rows of a table if i do:
(harmful = data lossing)

1. add new fields to the table.
2. change types of fields - i.e. from TINYINT(6) to TINYINT(8) or vice verse.
3. rename a field (can a field be renamed???).

thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Re: please give me suggestions for my database

Post by feyd »

aaaphp000000 wrote:1. add new fields to the table.
no.
aaaphp000000 wrote:2. change types of fields - i.e. from TINYINT(6) to TINYINT(8) or vice verse.
certain type changes have a chance of destructive. For example, changing varchar to int.
aaaphp000000 wrote:3. rename a field (can a field be renamed???)
renaming a field will do no damage; yes you can rename a field.
Post Reply