I have a table of electronic devices that serves as a generic superclass and then separate subclass tables for phones, laptops, cameras, etc. that extend the superclass and give specific information on the device (using the foreign key deviceID from the superclass table), in other words, Class Table Inheritance. My question is, should I ...
Hello,
I heard it's not good to use cursors, as they "unnatural" to DBMS and they provide bad perfomance.
But imagine the following situation: I have a stored procedure and I need to call this stored procedure for every customer from France (for example). I have a few options, such as using cursor, write all stuff in one query and call s...
I have id values for products that I need store. Right now they are all integers, but I'm not sure if the data provider in the future will introduce letters or symbols into that mix, so I'm debating whether to store it now as integer or string.
Are there performance or other disadvantages to saving the values as strings?
...
Hello all,
I'm building a custom shop and one thing that none of us here can agree on is how we should store the size/quantity fields for a product. I easily can't find information on this and am wondering how people have tackled this before?
Currently we are thinking of either storing the complete size/quantity information in somethin...
I know there are other naming convention discussions, but the ones I saw were all general guidelines, I'm asking more for advice on good practice regarding my specific case. However, if there is another question that directly covers my case, please link it and I will gladly delete this question.
I have a database for modeling electronic...
A friend of mine who is a computer scientist told me he thinks SQL is a thing of the past. I used SQL for years and think the language is totally relevant when dealing with database specific tasks.
My friend believes the new frameworks (e.g.: django, etc) that are coming out are making things even more generic, making SQL an outdated d...
Is there any tutorial on how to do a database design using dbDesigner or any other tool.
...
I am creating a light RPG game where a character is able to equipment a weapon, an armor and 2 accessories slot. Here's one possible solution:
equipped_equipment(<characterid>, <equipmentid>, <slotid>)
slot(<slotid>, slotname)
equipment(<equipmentid>, equipment_name, equipment_script_name)
So, to find out what weapon the character is ...
Hi
I'm using SQL Express 2008 edition. I've planned my database tables/relationships on a piece of paper and was ready to begin.
Unfortunately, when I clicked on data type for my pkID_Officer I was offered more than I expected, and therefore doubt has set in.
Can anyone point me to a place where these dates types are explained and exa...
Hi
I'm using VWD 2008 (SP1) and SQLExpress 2008. I'm creating a database first and then looking at using DynamicDataControls (seem useful and staright foward for a beginner like me).
Within VWD I created a new Dynamic Data Web Application. Then I added a new SQL database item. I noticed that this doesn't include stored procedures or......
Without wanting to sound too stupid, SQL Express is free and the free resources make it a good choice for a beginner like me. I know it has limitations (read other posts) but the figures mean little to me I'm afraid.
Can anyone give me ball park figures on the number of users it can handle? I'm looking at possibly 40-50 users maximum,...
We have an Oracle database here that's been around for about 10 years. It's passed through a lot of hands. In the course of those years, it's grown quite large, and there are some interesting anomalies in its design that have me perplexed.
Now, I'm historically a SQL Server developer. I used to steam and fume about the differences betwe...
Consider the following two tables:
User
- UserID
- UserName
Group
- GroupID
- GroupName
The obvious association is that Users will be in Groups. This by itself is a simple many-to-many join situation, so lets add a 3rd table:
UserGroup
- UserID
- GroupID
Under this textbook schema, I can easily include a specific User in a s...
Hi folks,
I've got a database in production for nearly 3 years, on Sql 2008 (was '05, before that). Has been fine, but it isn't very performant. So i'm tweaking the schema and queries to help speed some things up. Also, a score of main tables contain around 1-3 mill rows, per table (to give u a estimate on sizes).
Here's a sample datab...
I am planning to build a database for a school application. I have designed a database to
hold time tables for all the classes. It should also relate to the teachers taking the
subject for the class. Also should be able to handle a public holidays mentioned. Also the
attendance of all the students and teachers. Please guide me with the...
In the northwind traders database unitprice is listed on both the products and [order details] tables. Both tables list different prices for the same product. Is this a redundancy or is there an explanation for this?
...
I am designing a database and was thinking about the need for a one to many relationship. Traditionally I have done the normal PK (as a GUID) and set up the relationship, but I was wondering instead if doing that why not use a bitwise flag as the PK.
The relationship would be lost but the data itself would describe the relationship.
E...
Hi,
I'm designing a mySQL DB and I'm having the following issue:
Say I have a wall_posts table. Walls can belong to either an event or a user.
Hence the wall_posts table must references either event_id or user_id (foreign key constraint).
What is the best way to build such a relationship, considering I must always be able to know who ...
The location data is essentially in a tree structure. So when you ask someone for their address you would like to know what Area/Suburb, City/Town, State/Province and Country that they live in.
This data will hopefully be set up only once and need very little modification. Most E-commerce sites and a lot of others would need to store th...
Hello,
I'm designing an application that receives information from roughly 100k sensors that measure time-series data. Each sensor measures a single integer data point once every 15 minutes, saves a log of these values, and sends that log to my application once every 4 hours. My application should maintain about 5 years of historical da...