Tagged Questions
3
votes
1answer
179 views
Schema design: Use of association (aka: bridge/junction) table vs foreign key constraint with composite index containing a non-key field
This is an inventory database for IT assets. The models used are trimmed in order to focus on the problem at hand. Using SQL Server 2008. Thanks for taking the time to read and for any input you can ...
0
votes
1answer
32 views
Refer to a table with all rows or to the table which restricts allowed rows?
There are some discounts:
CREATE TABLE `discounts` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`value` decimal(4,2) NOT NULL,
`titleru` text COLLATE utf8_bin NOT NULL,
`titlehe` text ...
0
votes
1answer
54 views
Several variants of a string in tables
I need:
a table containing keyword phrases;
a table containing URLs;
a table (or maybe a view) with keyword-URL pairs (referring to IDs of the two previous tables);
tables holding keywords/URLs for ...
4
votes
1answer
71 views
How do you manage a list for particular object. for eg. user comments on specific object(user post etc.)
I am new to database and web application development. I want to know how to store a list for a particular object in a database. For example, user comments for a particular post(object), or the ...
2
votes
1answer
239 views
Under what conditions are polymorphic associations used? What are the alternatives?
As I understand it, polymorphic relationships among tables in a database allow one table to have one foreign key that references many tables.
I have found that tags are a common application of this ...
2
votes
1answer
80 views
One table or several tables?
I have several types of writings: articles, projects, reviews, etc.
I have a table containing paragraphs (fields id (INT) and partext (TEXT)).
Each writing consists of several (ordered) paragraphs. ...
5
votes
3answers
2k views
Inventory database structure when inventory items have varying attributes
I'm building an inventory database to store enterprise hardware information. The devices the database keeps track of range from workstations, laptops, switches, routers, mobile phones, etc. I'm using ...