Discussion:
How many tables can a database hold?
J. R. Westmoreland
2009-01-23 19:55:24 UTC
Permalink
Can someone tell me how many tables a given database can hold.

I'm looking at an initial design of an application that could have a table
of data for each city in a state. This could be possibly more than a
thousand tables.

With that many tables how would the performance of the database be effected?



Thanks,

J. R.





--------------------

J. R. Westmoreland

E-mail: jr-***@public.gmane.org
Brad Stiles
2009-01-23 20:04:26 UTC
Permalink
Post by J. R. Westmoreland
Can someone tell me how many tables a given database can hold.
Try here: http://www.sqlite.org/limits.html
Post by J. R. Westmoreland
I'm looking at an initial design of an application that could have a table
of data for each city in a state. This could be possibly more than a
thousand tables.
Is the data stored for cities so different that it can't be stored in
one set of tables for all cities, and keyed to another that has the
name?

/bs
J Glassy
2009-01-23 20:03:40 UTC
Permalink
J.R,
--I'd suggest you check out URL: http://www.sqlite.org/limits.html
--joins are typically limited to 64 tables

--Assuming you (CAN) define a database with >1000 tables, IMHO, this is a
fairly unconventional design strategy, if rarely needed -- some would say
this is inadvisable. Typically this sort of structure is addressed via a
normalization of the schema, such that 'cities' are stored as record wise
tuples within a larger relational scheme. ...just a thought..

cheers,
Joe
Post by J. R. Westmoreland
Can someone tell me how many tables a given database can hold.
I'm looking at an initial design of an application that could have a table
of data for each city in a state. This could be possibly more than a
thousand tables.
With that many tables how would the performance of the database be effected?
Thanks,
J. R.
--------------------
J. R. Westmoreland
_______________________________________________
sqlite-users mailing list
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
--
--------------------------------------------------------------------------
Joseph Glassy
Research Analyst/Programmer
University of Montana NSF EPSCoR Program
Davidson Honors College Room 013
MikeW
2009-01-26 14:28:34 UTC
Permalink
Post by J. R. Westmoreland
Can someone tell me how many tables a given database can hold.
I'm looking at an initial design of an application that could have a table
of data for each city in a state. This could be possibly more than a
thousand tables.
With that many tables how would the performance of the database be effected?
Thanks,
J. R.
As others have observed, this is an unwise design, not least that any code
written will have to 'edit' in the city table name by program rather than
having it manipulable by SQL statements and 'bound' values.

Like sets of items ("entity/relationship sets") should go into the
same table with a column/field value to distinguish the instances.
You can easily say "... WHERE City='Boston' ..." or whatever.

Another way of putting this is that separate tables should not
usually be used just to group sets of otherwise
identically-structured data records.

Search keywords: database schema design entity relationship

Regards,
MikeW

Continue reading on narkive:
Loading...