|
Posted by Andy on 01/16/07 21:14
"J.O. Aho" <user@example.net> wrote in message
news:514se1F1ia8h4U1@mid.individual.net...
> Andy wrote:
>> "Rik" <luiheidsgoeroe@hotmail.com> wrote in message
>> news:581e0$45ad2fed$8259c69c$26539@news1.tudelft.nl...
>>> Andy wrote:
>>>> Please tell me how to merge two sql databases.
>>> Huh? Sql databases? What kind?
>>>
>>>> Do you know any tutorial about it?
>>>> What I want, is to insert data from sql I bought into sql which came
>>>> with a website's script. Sql I bought has only one table containing 4
>>>> fields: id, name, ingredients, procedure.
>>>> Thank you in advance.
>>>
>>> Hoepfully you have a user with permission on both databases. If so,
>>> choose
>>> to work on the 'extra' database and:
>>>
>>> ALTER TABLE table_name RENAME normal_database_name.table_name
>
>> It is MySql database.
>> Do you mean that I supposed to install a database I bought than work on
>> that? I thought that I can merge sqls in a special program.
>> If so please tell me where I supposed to write the code you posted?
>> (ALTER TABLE table_name RENAME normal_database_name.table_name)
>> I am new to sql database so I am not sure what to do?
>
> The two databases you have, the one you bought and the one you had, do
> they have the same table names and column names?
>
> --
>
> //Aho
>
This is a print view of tables I have on my website's database and a print
view of a database I bought. (bottom one I just bought)
Sorry if it will not desplay correctly on newsgroup.
Show tables: `ad_groups`, `admin_control`, `admin_login`, `ads`,
`categories`, `emailed_recipes`, `ingredients`, `ratings`, `recipes`,
`search_terms`, `subscribers`, `users`
--------------------------------------------------------------------------------
ad_groups
Field Type Null Default
groupid int(10) No 0
groupname varchar(255) No
Indexes: Keyname Type Cardinality Field
PRIMARY PRIMARY 3 groupid
groupid UNIQUE 3 groupid
groupid_2 INDEX None groupid
Space usage: Type Usage
Data 88 Bytes
Index 4,096 Bytes
Total 4,184 Bytes
Row Statistic: Statements Value
Format dynamic
Rows 3
Row length ψ 29
Row size ψ 1,395 Bytes
Creation Jan 05, 2007 at 09:11 AM
Last update Jan 05, 2007 at 09:11 AM
--------------------------------------------------------------------------------
admin_control
Field Type Null Default
approve_content char(1) Yes Y
Space usage: Type Usage
Data 5 Bytes
Index 1,024 Bytes
Total 1,029 Bytes
Row Statistic: Statements Value
Format fixed
Rows 1
Row length ψ 5
Row size ψ 1,029 Bytes
Creation Jan 05, 2007 at 09:11 AM
Last update Jan 05, 2007 at 09:11 AM
--------------------------------------------------------------------------------
admin_login
Field Type Null Default
login varchar(20) Yes NULL
password varchar(20) Yes NULL
sessionkey int(10) Yes NULL
Space usage: Type Usage
Data 20 Bytes
Index 1,024 Bytes
Total 1,044 Bytes
Row Statistic: Statements Value
Format dynamic
Rows 1
Row length ψ 20
Row size ψ 1,044 Bytes
Creation Jan 05, 2007 at 09:11 AM
Last update Jan 05, 2007 at 09:11 AM
--------------------------------------------------------------------------------
ads
Table comments: Ads table
Field Type Null Default
adid int(10) No 0
image varchar(50) Yes NULL
url varchar(255) Yes NULL
code text Yes NULL
impressions int(10) Yes 0
clicks int(11) Yes 0
groupid int(10) Yes NULL
type char(1) Yes NULL
name varchar(255) Yes NULL
Indexes: Keyname Type Cardinality Field
PRIMARY PRIMARY 2 adid
adid UNIQUE 2 adid
adid_2 INDEX None adid
Space usage: Type Usage
Data 316 Bytes
Index 4,096 Bytes
Total 4,412 Bytes
Row Statistic: Statements Value
Format dynamic
Rows 2
Row length ψ 158
Row size ψ 2,206 Bytes
Creation Jan 05, 2007 at 09:11 AM
Last update Jan 14, 2007 at 06:42 AM
--------------------------------------------------------------------------------
categories
Field Type Null Default
categoryid int(10) No 0
category varchar(100) Yes NULL
Indexes: Keyname Type Cardinality Field
PRIMARY PRIMARY 11 categoryid
categoryid UNIQUE 11 categoryid
categoryid_2 INDEX None categoryid
Space usage: Type Usage
Data 224 Bytes
Index 4,096 Bytes
Total 4,320 Bytes
Row Statistic: Statements Value
Format dynamic
Rows 11
Row length ψ 20
Row size ψ 393 Bytes
Creation Jan 05, 2007 at 09:11 AM
Last update Jan 05, 2007 at 09:11 AM
--------------------------------------------------------------------------------
emailed_recipes
Field Type Null Default
sender_email varchar(255) Yes NULL
friend_email varchar(255) Yes NULL
recipeid int(10) Yes NULL
Space usage: Type Usage
Data 0 Bytes
Index 1,024 Bytes
Total 1,024 Bytes
Row Statistic: Statements Value
Format dynamic
Rows 0
Creation Jan 05, 2007 at 09:11 AM
Last update Jan 05, 2007 at 09:11 AM
--------------------------------------------------------------------------------
ingredients
Field Type Null Default
recipeid int(10) No 0
ingredient varchar(255) No
Space usage: Type Usage
Data 30,656 Bytes
Index 1,024 Bytes
Total 31,680 Bytes
Row Statistic: Statements Value
Format dynamic
Rows 841
Row length ψ 36
Row size ψ 38 Bytes
Creation Jan 05, 2007 at 09:11 AM
Last update Jan 05, 2007 at 09:11 AM
--------------------------------------------------------------------------------
ratings
Field Type Null Default
recipeid int(11) No 0
rating float(10,2) No 0.00
ip varchar(50) Yes NULL
Indexes: Keyname Type Cardinality Field
recipieid INDEX None recipeid
Space usage: Type Usage
Data 48 Bytes
Index 2,048 Bytes
Total 2,096 Bytes
Row Statistic: Statements Value
Format dynamic
Rows 2
Row length ψ 24
Row size ψ 1,048 Bytes
Creation Jan 05, 2007 at 09:11 AM
Last update Jan 05, 2007 at 11:46 PM
--------------------------------------------------------------------------------
recipes
Field Type Null Default
recipeid int(10) No 0
title varchar(255) Yes NULL
recipe text Yes NULL
userid int(10) Yes NULL
rating int(10) Yes 0
categoryid int(10) Yes NULL
date varchar(20) No
story text Yes NULL
hits int(10) Yes 0
status char(1) Yes W
Indexes: Keyname Type Cardinality Field
PRIMARY PRIMARY 105 recipeid
recipieid UNIQUE 105 recipeid
recipieid_2 INDEX None recipeid
Space usage: Type Usage
Data 58,668 Bytes
Index 4,096 Bytes
Total 62,764 Bytes
Row Statistic: Statements Value
Format dynamic
Rows 105
Row length ψ 558
Row size ψ 598 Bytes
Creation Jan 05, 2007 at 09:11 AM
Last update Jan 14, 2007 at 06:31 AM
--------------------------------------------------------------------------------
search_terms
Field Type Null Default
term varchar(255) Yes NULL
count int(10) Yes 0
Space usage: Type Usage
Data 20 Bytes
Index 1,024 Bytes
Total 1,044 Bytes
Row Statistic: Statements Value
Format dynamic
Rows 1
Row length ψ 20
Row size ψ 1,044 Bytes
Creation Jan 05, 2007 at 09:11 AM
Last update Jan 05, 2007 at 09:18 AM
--------------------------------------------------------------------------------
subscribers
Field Type Null Default
emailaddress varchar(255) Yes NULL
Space usage: Type Usage
Data 24 Bytes
Index 1,024 Bytes
Total 1,048 Bytes
Row Statistic: Statements Value
Format dynamic
Rows 1
Row length ψ 24
Row size ψ 1,048 Bytes
Creation Jan 05, 2007 at 09:11 AM
Last update Jan 05, 2007 at 09:11 AM
--------------------------------------------------------------------------------
users
Field Type Null Default
userid int(10) No 0
login varchar(50) No
password varchar(50) No
email varchar(255) Yes NULL
newsletter int(1) Yes NULL
Indexes: Keyname Type Cardinality Field
PRIMARY PRIMARY 1 userid
userid UNIQUE 1 userid
login
userid_2 INDEX None userid
login
Space usage: Type Usage
Data 40 Bytes
Index 4,096 Bytes
Total 4,136 Bytes
Row Statistic: Statements Value
Format dynamic
Rows 1
Row length ψ 40
Row size ψ 4,136 Bytes
Creation Jan 05, 2007 at 09:11 AM
Last update Jan 05, 2007 at 09:11 AM
Tables I bought:
recipes
Field Type Null Default
id bigint(20) No
title varchar(255) No
category varchar(100) No
incredients text No
procedures text No
imagepath varchar(255) No
notes varchar(255) No
status varchar(15) No Active
Indexes: Keyname Type Cardinality Field
PRIMARY PRIMARY 571 id
Space usage: Type Usage
Data 506,804 Bytes
Index 9,216 Bytes
Total 516,020 Bytes
Row Statistic: Statements Value
Format dynamic
Rows 571
Row length ψ 887
Row size ψ 904 Bytes
Next Autoindex 621
Creation Jan 12, 2007 at 03:50 PM
Last update Jan 12, 2007 at 03:59 PM
Navigation:
[Reply to this message]
|