Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





One Big Database Or A Lot Of Small Ones?


My boss is implementing a system where a lot of different sites will be using the same exact database structure. He has it in his head that things would be simpler with one database shared by hundreds, possibly thousands of sites. I feel like each site deserves it's own database, even if it involves more maintainence.




View Complete Forum Thread with Replies

Related Forum Messages:
Backup A Small Database.
I'm looking to backup a small mysql database. The problem is mysqldump does not exist on the server I'm trying to export the database from.

Does a php script exist which I could use to do essentially the same thing as mysqldump?

View Replies !
A Huge Database Or A Lot Of Small Databases
I have a question regarding database performance.

Which of these two designs would be better:

-Having one huge database with 50 tables or so (each table having millions of rows)

or

-Having a lot of databases with the same amount of tables, but each table would have only thousands of rows

*The mysqlserver is running on a P4 3.0 ghz with 1 gb in ram, but I may upgrade my server soon.

*Privileges to create databases is not a problem since I own the server

View Replies !
Small Database, High Load
I have a very heavy mysql database used website. Data is constantly being updated and at peak there is well over 1,000 people online, after it hits the 1,000 mark, the website starts to lag pretty bad.

My database is only small at around 90mb. We have a web server for the files, and a database server for the database. The load on the web server is fine. But the database server is pretty high.

Would replication reduce lag and load? if i was too add a second database server?

View Replies !
Inserting Small Image Directly Into Database
How do you insert an image into a table directly using something like data studio?
I have tried googling it and it seems all the examples are using a language to do it for you. The images are between 2-4k and the table is just an int column followed by a blob column. I just thought the statement would go like

INSERT INTO sometable VALUES (1,'image.jpg');

The web suggests uploading and downloading in PHP (which im using) but im building the data first using data studio then just displaying the table information using PHP.

Before i go into displaying the information on the page i just wanted to make sure the insert query is correct.

View Replies !
Small SQL & Php Webpage Field Database Task
In a webpage, imagine a little section where the user fills in his/her contact details to register. Among this section is a field called "Country". The task is to make this field automatically generate the persons current country of residence. I am told, that the IP ranges and the country to which they belong is in a CSV .xls file. I am also told that the best way to do this is to:

1) Insert the CSV into database table (MySQL).
2) Use php to get that country name onto the website field.

View Replies !
How To Reset Yahoo Small Business MySQL Database
I am a new user of "Yahoo Small Business" web hosting service and I changed
a lot of settings in my "MySQL Database" using "phpMyAdmin" utility during my
learning period. Now, I want to reset my Yahoo Small Business MySQL Database
to default settings or to reinstall it (I want it to be the same as it was newly
activated).

Note: I tried to repair my database with Yahoo's "Database Setup" page and the
message "Database scheduled for repair" appeared for a few days but nothing
happened. And, I can not login to my database using "phpMyAdmin" utility.

If you can help me to reset my "Yahoo Small Business - MySQL Database" I will
be very pleased.

View Replies !
Handler_read_rnd_next = 13k On SMALL Db
I have two very small DBs.

One for a little number game, which only 6 people hit 1-3 times a day. The other is for a prototype of a game I'm working on, and there are no more than 3 users on this.

Using phpmyadmin, I check the page with runtime info and I see

Handler_read_rnd_next 13 k

If I reload this page a couple times, it goes up to 14k.

Most of the queries I use look like

Code:

SELECT c.color, b.percent
FROM tbl_creatures a, tbl_creatures_colors b, tbl_colors c
WHERE a.creature_id =1
AND a.creature_id = b.creature_id
AND b.color_id = c.color_id

And the EXPLAIN SQL for these comes up with

Code:

id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE a const PRIMARY PRIMARY 4 const 1 Using index
1 SIMPLE b ref PRIMARY,color_idPRIMARY 4 const 2
1 SIMPLE c eq_ref PRIMARY PRIMARY 4 hq_proto_creatures.b.color_id 1

To me, this all looks fine. I can't tell if all the Handler_read_rnd_next is due to the phpmyadmin status checks or not.

View Replies !
Small Databases
I am wondering if having a database for the client back office, a database for the static website and a database for website stats would be a good idea.

The client database would hold credit card info, user info, reg info, project info, client messages and more.
The website database would carry all the content for the pages of the public website like about us, contact, home page, news and such.
The website stats database would keep track of user agents, new hits, returning hits, keyword searches made on the client websites and all that jazz.
Should I make this all ONE giant database or three smaller database?

View Replies !
One Big Table Or Many Small Ones?
I am designing an interactive website consisting of a few pages and I want to track individual user progress. I was wondering if it would be better to create one big table for all values on all pages (Which may have a lot of columns, easily hundred or more), or created a separate table for each page (so I could have some 10 tables with 10 columns or more). Or does it not matter?

View Replies !
Big Select Vs Small Ones
I have an array of 10 IDs.
I need to query the db for values associated with these 10 IDs.

In a lot of places, I have seen people using a php foreach like this

foreach (ids in array)
{
query = SELECT values FROM tables WHERE id = [id 1 in array]
do query
store values
}

we could build one big select statement like this:

query = SELECT values FROM tables WHERE id = [id 1 in array] OR [id 2 in array] OR [id 3 in array].... until we have ids.

View Replies !
Small Query Optimization
I need this query optimized using indexes. So I was wondering how I could optimize it to work with an index for speed.The query is:

Quote: select ided from products where dates <= 2006-11-11 or cost=0.00 or url not like 'http://%' or imgurl not like 'http%'

I tried making an index on (dates,cost,url,imgurl) but it doesn't seem to use the index when I do the explain part. I find that even when I miss of the like parts of the query it still is not using the index. It seems to not use the index because of the "or" that is used in the query instead of the "and". Could this be the reason and how could I over come this so that it will use the index.

View Replies !
Small Favor Gone Wrong
I have a VPS account and I am trying to move my sister's professional organizations site onto my server more or less as a favor (getting paid a little - but not really worth my time). It is being hosted by a professional hosting company that supplied me with ftp access to download the site for the move.

I am running into a problem because I don't know how to set-up/use mySQL through UNIX. Previously I have used the Plesk interface provided with my VPS account. Plesk (or at least my hosting services configuration of it) won't allow me to create the user I need in order to import the database because the user ID is contained within the user PW. (this is the database coming from the vendor).

The original host has been unhelpful at best so I thought before I go to them and ask for assistance (that I am pretty sure I won't get anyway) that I would post here to find out if there is any easy way through this roadblock or if any the unix commands are simple enough, how I would proceed that way.

View Replies !
Small Binary Data
Can anybody tell me what way is best to save a small binary data (16 Byte) in MySQL?


View Replies !
One Large Table Or Many Small Tables?
I'm trying to decide whether to use one large table or many small tables.
I need to gather information from various devices (about 500). Each device
has its own Id and some data.

Should I use only one table with an indexed column for the ID and another
column for the data, or should I use 500 tables each with only one column
for the data?

View Replies !
MySQL Upload Small Files
I'm uploading small files (>10K) and mysql is deleting it. The one field is a blob field and everytime i test upload a file thru phpMyAdmin within 2 seconds mysql deletes the row. Theres nothing in mysqld.log, there another log i should be checking out?

View Replies !
One Big Query Vs Lots Of Small Queries
I am in the process of migrating a MySQL database from one schema to another and am writing a script to extract the info from one table to be inserted into multiple tables on new new db.
My question is this, is it better for me to make one giant query (about 1 million records returned) on the source table, manipulate the data, then enter in the data by cycling through the results, or would it be better to split up the query on the source table into lots of smaller queries with a short pause in between?

View Replies !
Structure Of Small Social Network
I need to setup a social network type mysql database, but not as intense as friendster, thefacebook, myspace, etc.

i have a structure set up but it think it's weak and extremely limited:


Code:


+---------+-----------+
| user_id | friend_id |
+---------+-----------+
| 5 | 4 |
| 1 | 7 |
+---------+-----------+



i fear it's going to be a lot of redundant IDs in a column, which i think could be a problem when retreiving friends:


Code:


+---------+-----------+
| user_id | friend_id |
+---------+-----------+
| 5 | 4 |
| 1 | 7 |
| 1 | 9 |
| 7 | 9 |
+---------+-----------+



i want to do a "bob is friends with john" and a "jackie knows sally through richard" (aka friend of a friend). that's it and nothing more. how do i structure mySQL database to be able to this?

View Replies !
One Huge Table As Appose To Many Small Ones
i have a very large XML DB (60gb+ and growing on a daily basis) which holds complete life cycles of stock option , i used to hold it all in folders with each folder named like the option paperId so it seemed logical to me to hold it now in diffrent tables for each paper even tough the are all the same exact table , now i'm having some problems with hibernate (one of the biggest reasons i left XML) and so many tables , is it more effiecent to keeeping data like that ?

ofcours i will have to change the PK from datetime to paperId+DateTime if i decide to change to one big table ... how can i calculate diffrence in retrieving data ?

View Replies !
Several Small Calls Vs One Large Call
I am working on a php interface to a mySQL db which will pull lots of rows from the database. Assuming I am selecting a hundred rows by their auto_incremented ID's, is it better to do this with a loop of 100 "SELECT ... WHERE id=" calls, or to do it with one single "SELECT ... WHERE id IN(...)" call, with IN() holding a list of the hundred items.

View Replies !
One Large Table Vs. Many Small Tables
I'm working on a design using PHP & MySQL and I'd like to get some opinions on this.

My design has several tables that will be referenced but I'm wondering if those tables should be broken down even more and referenced more dynamically. The reason that I wonder about this is for long term goals. I hope that eventually there will be two or three thousand records that will be used on a regular basis. These records will need to be separated into groups, but I'm not sure if I should use a field in the database table or create a new table for each group.

If a few hundred records could be in each group, do you think it's better to use one large table with a field for the group ID, or a new table for each group?

View Replies !
Help With A Small Query Optimization Using An Index. THANKS!
I need this query optimized using indexes. So I was wondering how I could optimize it to work with an index for speed.

The query is:

Quote:

select ided from products where dates <= 2006-11-11 or cost=0.00 or url not like 'http://%' or imgurl not like 'http%'

I tried making an index on (dates,cost,url,imgurl) but it doesn't seem to use the index when I do the explain part. I find that even when I miss of the like parts of the query it still is not using the index. It seems to not use the index because of the "or" that is used in the query instead of the "and". Could this be the reason and how could I over come this so that it will use the index.

View Replies !
Large .sql File (break Down To Small Parts)
i have an oscommerce installation that generates a 200mb sql backup file. i want to try and rebuild the installation on my local pc (localhost) to emulate and play with, unfortunately the 200mb file is difficult to handle. phpymadmin seems to crash.

i have console access on the host however.

is there a way i can break down the sql file into smaller increments for easier uploading?

View Replies !
MySQL Query Cache: Should I Cache Small, Simple Queries Or Only Complex Ones?
Query cache works great for long, complex queries, but should I also be caching the simplest of select queries.

For example let's say I had a table with 100 records and I needed to select something using a unique key:

SELECT name FROM products WHERE id = 3
Is caching the above pointless, especially in terms of wasted cache memory, considering how basic it is?

View Replies !
Small Tables Or A Few Big Tables
My Web site is going to use a MySQL database extensively throughout the
Web site. It is a content management system type Web site with lots of
users and written articles and other things. With my database I'm
trying to figure out if I should create big tables that have a lot of
rows in them or if I should create a lot of tables that are very
specific to its data and use a lot of table joins in my select
statements. I'm mostly concerned about performance.

I'm thinking that if I make a lot of tables, then select statements I
do will be really fast because my tables won't contain very many rows.
But I don't know if this is true or not or if it matters for
performance reasons or not.

In my Web site I have a lot of different kinds of data that could put
in many different tables. But, without data redundancy and without
using extra storage space, I can still make a few big tables, and make
that work. I just don't know which way is best for performance --
speed, I want speed. Anybody know what I should do or know a book I
should read or a Web site to go to?

View Replies !
Could Not Connect To The Database, Please Recheck The Settings You Specified. Also Make Sure That A Database With The Name You Specified Already Exists On The Database Server. PhpAdsNew Will Not Create The Database For You, You Must Create It Manually
The error message I get above is the same everytime when trying to install phpAdsnew. I have tried everything. I am hosted through yahoo! and have actually succesfully installed scripts before even though I know nothing about it. Now that I have a "auto-install", it does not work. Yahoo! also offers php-nuke with the auto-install where you just click a few buttons, and I get a similar error stating that it can not conect to the database.

Please can anyone help me and tell me what I am doing wrong?

View Replies !
Database Transfer Between Oracle 8 Database And MySQL Database
Is it somebody out there who has made a migration from an Oracle server to an MySQL server??

The scenario is as simply:

I've got a Oracle 8 server with a database with content that I want to transfer to a MySQL database. No special data, constraints etc that MySQL not will handle.

My solution is to reverse engineer the database from ERStudio and then produce a SQL script that will insert the data into the MySQL engine.

But I can't do this, because the customer want me to do a PL/SQL script that does this, even if he never have worked with Oracle.. So the question is.. Do someone know a simplier way to do this or do I have to teach myself PL/SQL and make a script that produces a MySQL sql script ?

View Replies !
Create Error: Access Denied For User: '@localhost' To Database 'database Name'
I have already installed the php4, apache and mySQL on windowsXP SP2.
when I wanted to create database through PHP code it showed me error like this "Create Error: Access denied for user: '@localhost' to database 'database name'" and I can't even create database using mySQL either.

View Replies !
How To Apply New Database Structure To An Existing Database, Without Overwriting Data?
I am writing a simple blog software application. We released a version of this software a while ago.

It comes with a sql-tables.sql file, that you can just import into your mysql database and it will setup all the tables for you, for a fresh installation. We made the sql file by just doing an export I believe, without exporting the data that was in OUR database.

Well, since then several people have downloaded and installed our software, and are using it.

We are about to release a new version soon, however. Since it is all still under development, many things have changed in our database structure. We've added new tables, and modified or even removed fields from existing tables.

So for the new release, we're going to include a new sql-tables.sql file obviously, so that for fresh installations they can still install it just like normal.

However, the question is... how do you "upgrade" all the previous version's users's databases, without losing any of their data?

Is there anyway to export just the structure of our current database... then somehow apply it so that it just goes through and changes another database to match the new structure?

Or any ideas at all how to do this?

View Replies !
Converting Ms Access Database To Mysql 5 Database
I've imported a ms access database into a table in a mysql database.
The access database contains a field that holds date/time values in
'general date' format. These all show up at 01/01/1970 in the mysql
database. I believe the field in mysql is wanting UTC and shows
numbers when looked at from the sql command line (i.e. March 13, 2006,
5:31 pm is shown as 1142289086). How do I get the access data into
that format so it will import properly?

View Replies !
Create Database Mysql Database In My System
I have installed MySQL 4.1.7-Standard in MacOS X (10.3.5). I have ONLY database test. According to the manual there should be TWO. test and mysql. I have re-run mysql_install_db several times with he same result. Can some mysql guru explain or point me to the right page to have this mysql database in my system?

View Replies !
How To Convert MS Access Database To Mysql Database??
now i have more than ten thousand data in MS Access database and now i heed change it in to mysql database!So do you know how to that?I think i not time to key in back this all data because it is imposible la,because more than 10 thousand data la!

View Replies !
How To Convert .dbf Database To Mysql Database
i want to convert .dbf database to mysql database. i have my college results in .dbf format file. i want to convert it from .dbf to .sql .

View Replies !
How To Move Tables From One Database From Another Database
I want to move some tables from one database to another one. How to do this in MySQL.

View Replies !
Drop Database Named As Database
I wanted to know if someone created a database named as 'database' then how to drop that database because

mysql> drop database database;

View Replies !
Restoring Database In A Changed Database
I have a database name 'rtdb1' with a table 'review_table'.

The 'review_table' has one column 'version' of varchar 20 type.

I took the mysqldump of the rtdb1 database.

Then I changed by table 'review_table' by adding one more column 'category' int type and called the database 'rtdb2'.

But when I restore my dump of 'rtdb1' database to 'rtdb2' database, I don't see the 'category' column.

View Replies !
Database Error : No Database Selected
I am trying to install an application called weberp on my website. I have writen a script to test that the database name, user name, and password are all correct, and mysql is there and running okay.
I entered a script into myphpadmin to establish the database. All the tables, and so forth, were created with no errors.

View Replies !
Create A Database From Access Database
i create a database by access, how can i use it in mysql 5.0.18.

View Replies !
Extracting Data From Large SINGLE-table Database To MULT-table Relational Database
I have a very large single-table database of articles that I want to convert to a multi-table, relational database.

The existing single-table database contains fields for article author, article source, and article category, where several 'author', 'source', and 'category' IDs repeat dozens of times for hundreds of different articles.

I want to create seperate tables for author, source, and category and populate the new tables by extracting data from the original single-table database by unique ID field.

I figured out how to use INSERT and SELECT to pull data in new tables, but can't figure out how to pull only a single instance of a unique author, source, and category to create master reference tables for author/source/category.

View Replies !
USE Database Prompt :: How To Know About A Database
How do I know what database I am 'using'?

I launch mysql from the command line. Type 'show databases', then pick a database to use by typing 'use databasename'. I am now using that database but have no visual cue.

How do I include the username, database name, etc in the 'mysql>' prompt?

Note, I can customize the command prompt on linux to include user, host, directory, etc.. so I always know who I am and where I am.

View Replies !
Convert Ver 4.0 Database To Ver 4.1 Database
I do not know if this is the correct forum to ask this in or not.
We have changed hosts and the old hosting company was running MySQL version 4.0.27 standard and our new host is running MySQL version 4.1.22 Standard.
We have a database from the old host that we need to convert to MySQL ver 4.1.22 so we can use it on the new host.
We were running a older version of SugarCRM on the old host but we upgraded when we went to the new host and the new version of SugarCRM will not work with the copy of our old database file. It says that it needs MySQL version 4.1.2 or higher.
Is there any way to convert the old data base.

View Replies !
Dropping Database Called "database"
I have finally managed to install and configure mysql on my pc for testing but need to import data from an Access Database.

I first found out that I had to create a new user and grant priviledges to it - which means I could connect.

My next stage was using the migration tool to import the data.

This did not go so well...

Firstly, many of the table names had spaces in them which means that they are effectively useless in mysql.

So I thought I would start again, ensuring that the tables are first renamed in Access.

I then went to show databases and, during the migration process, it has given the imported data the default name of "database".

I now have a major problem deleting it as it thinks the name is an instruction!

Anyone know how to get over this issue?

View Replies !
How To Copy Mysql Database Table To Another Mysql Database
i have database named(rocky) in the other domain how can i copy it in nessan database in the other domain.

View Replies !
Move Table From A Database To Another Table In A Database
I am currently developing a project as I am only a web designer.

I need to move a table from a database to another table in a database.

I am using SQL Server 2005 Express. How is this done?

I have been stuck for months trying to figure this out!

I have even bought SQL Server Express 2005 for Dummies and cannot figure this out!

I need someone to hold my hand and walk me through this literally! Or give me syntax code to do this.

View Replies !
Database Pw
i've searched quite a bit, but cant find any post relating to sql
command for setting database passwords. anyone know how?

View Replies !
Same Database Name
Is there a way to prevent users from creating the same database name?
for example
our name schema goes like: mysql_1234, mysql_32143, mysql_....
But we found out that some one could create MYSQL_1234 while mysql_1234
already exists.
I guess what we need to know is that if there is away for mysql to not
allow same names even though its different case characters.

View Replies !
Database Name
Is there an SQL command that i can perform which will return me the name
of the Database i'm currently conected to.

View Replies !
New Database
I am quite new to working with databases and am currently having problems connecting to my new MySQL database. I have been working with dreamweaver and have been using a db on my localhost which worked fine, however now I have set up a db with an online host and I am having problems connecting to it. I go in to dreamweavers MySQL connection control panel and fill in all the details that I have been given, user name and password, and from the top of my db website which says “MySQL 4.1.15-standard running on 217.174.253.162 as stopticket@server217-174-253-162.live-servers.net” so I use the 217.174.253.162 as the server, however when I try to connect I get an error message saying “2003 cant connect to MySQL server on “217.174.253.162” (10060)”. Has any one got any idea of something I could be doing wrong

View Replies !
Database Getting Too Big
i have a mysql database which i think is getting too big! I have about a thousand records which came from a form on my webpage and I am worried that i may get complications in future if i dont do something! My question for today is how do I archive my database so that I can go back to it whenever I need to find old records? Do i just use the mysql admin console to do a backup and then delete the table contents or what?

View Replies !
Database Php
id name
1 Dad
2 Mom
3 Brother
4 Sister
5 Brother


I want to use html form and php to access the database and alter it, basically delete and insert. I know how to make the html form. But I don't know how to create the php script. So far I've been using phpmadmin, it's great but I want something simple.

Sergewiz, helped me with the main php element that I wish to use.

update table_name set id = id + 1 where id > 3;
insert into table_name(id,name) values(4,'sister');

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved