A description of the structure of the database - including the structure of the tables, columns, constraints, views, etc, etc... that make up the database.Normally defined in the text, generally SQL in an RDBMS, the schema describes the complete blueprint for the database, defining everything about the database except that data itself.
Questions tagged [database-schema]
2931 questions
0
votes
1 answer
Tag synonyms in DB schema with three columns
Assume you have the same data model as described here.
Table: Item
Columns: ItemID, Title, Content
Table: Tag
Columns: TagID, Title
Table: ItemTag
Columns: ItemID, TagID
If you want to have tag synonyms similarly as are on stackoverflow, where…

xralf
- 3,312
- 45
- 129
- 200
0
votes
1 answer
Table relations SQL Server issue
I need an advice. I have some issue with modeling the database in SQL Server. Let's say I want to create a cars database. There are various type of engine like fuel, electric, hybrid. Every type has some specifications. But not the same (not the…

Serv0
- 181
- 1
- 7
- 17
0
votes
1 answer
"Auto-complete" tags with MapReduce in MongoDb
Short version: I need to get an array of distinct tags matching /web/ or any other term for that matter, out of the Posts collection.
I'm having doubts about implementing a MapReduce pattern to feed an "auto-complete" field. Do you think this is…

Roberto
- 1,944
- 1
- 30
- 42
0
votes
2 answers
Database schema for very fast read access at the cost of write access speed
I have a problem where I have large database that take very long time to access partly because its normalized and requires a lot of joins (its very similar to start schema right now). However, I don't care about write time/potential write anomalies…

0fnt
- 8,211
- 9
- 45
- 62
0
votes
1 answer
Providing two schema name in JDBC connection URL
My application uses an xml datasource file for accessing the DB..There are number of schemas which are present inside the DB and I have no problem accessing any of the schemas.
However we have started using BIRT for reporting and charts generation…

AngelsandDemons
- 2,823
- 13
- 47
- 70
0
votes
1 answer
mySQL 5.5.17 / Workbench 5.2 synchronize fails (errno: 150)
I'm trying to synchronize some model updates with an existing database on mySQL. It worked well previously but now i'm getting an error saying:
#1005 - Can't create table 'edu_dev.#sql-132f_eef09' (errno: 150)
I can't really get what's wrong. The…

Kilian Schefer
- 579
- 5
- 18
0
votes
3 answers
Partition a table in mySQL
Have a table with 3 million rows and would like to partition it. There are 5 columns, one of them which is a date column. I would like to split up the table by dates. Any easy help would be great. Thanks

George Milonas
- 553
- 7
- 22
0
votes
1 answer
Getting a posts tags using SQL joins
I'm trying to retrieve the tags of each blog post in one SQL query. I have a posts table, post_tags table and a tags table. The post_tags table exists to remove the many-to-many relationship between posts and tags. Here's the schema for those…

James Dawson
- 5,309
- 20
- 72
- 126
0
votes
2 answers
Database schema to attach more than one tag to each blog post
I'm working on a blog system (cliche I know, but it's a class assignment), and I want to be able to attach tags to my posts. I have a tags table and a posts table and their fields look like this:
| p_id | c_id | u_id | title | body …

James Dawson
- 5,309
- 20
- 72
- 126
0
votes
4 answers
When is it necessary to add a table in the database for lookup values
just looking for some general direction/best practice about when to use a lookup value table. Lets say I have a table with transactions/payments in it which has the following…

zuallauz
- 4,328
- 11
- 43
- 54
0
votes
2 answers
What database structure is better for database based unique hit counter system?
I want to add unique hit counter to my website using PHP. So this counter will save visitor's IP for each page in database. I have a idea about database structure like this:
1 table ( hits ) and 2 columns ( ip , page_url ). So I can get distinc IPs…

John
- 877
- 5
- 14
- 21
0
votes
2 answers
Create Schema in Oracle 11g
I am trying to create a new Schema in Oracle 11g.
I have referred to the Oracle documentation
I have tried to execute the commands mentioned there.
CREATE SCHEMA AUTHORIZATION oe
CREATE TABLE new_product
(color VARCHAR2(10) PRIMARY KEY,…

Sunil
- 1,238
- 3
- 13
- 21
0
votes
1 answer
How to handle entity versions in SQL Server?
I have a SQL Server 2008 R2 database that contains a table that holds my entities from an ad.
It looks something like this…

Banshee
- 15,376
- 38
- 128
- 219
0
votes
2 answers
What is an optimal way to model inheritance in a database with mostly static data?
I'm modelling a role-playing game and need to create the database schema for equipment. The data will be mostly static.
This article discusses three ways to model inheritance in a database: Table per Class Hierarchy, Table per Subclass, and Table…

Jason
- 8,400
- 10
- 56
- 69
0
votes
3 answers
Add quantities to all products programatically in magento
I want to add quantities to all of my 780 products using custom script. Is there anyway to do it from admin. I had tried a way to export products first then add quantities in csv file, remove all products from store, then again import products, its…

sanjay kumar
- 69
- 1
- 2
- 9