Hi,
I have to build a news database that will potentially take news from many different providers and display them on our site. Right now I am thinking that I should just come up with how it will look on our site, the fields we would display, and then when a new provider comes along, right a script that will parse their data into our fo...
I have a table with this structure (simplified):
artID: 1
artName: TNT
ArtBrand: ACME
...
And I want to normalize it making a separate table for the brand (it will have additional data about every brand)
So I want to end up with this
article table:
artID: 1
artName: TNT
brandID: 1
...
brand table
brandID: 1
brandName: ACME
brandI...
Is there a proper term in data modeling to describe the following?
Given table [order] table with an [order_status] column, which when first conceived has 5 acceptable values, obviously having 5 different meanings and at least > 1 behavior (but not necessarily 5 different behaviors) from an application perspective.
One would typically ...
We are revamping our product which gets highly customized for each client. Currently we have to maintain separate database for each client which heavily affects persistence layer.
Our major goal for new database schema is extensibility. I am not an expert database designer thus require input from experts :).
I am thinking about extensi...
I have a table of users and a table of questions. The questions table will have records that represent "Questions", "Answers" and "Comments" to questions or answers. I'd like to create a dashboard for each user in which its possible to see activities related to questions and answers. For example if user A creates a question and user B re...
I am guessing no, since the foreign keys are the primary keys in their own tables, so they will be unique.
More info
I am using MySQL and the following three tables are using the InnoDB engine.
======================= =======================
| galleries | | images |
|---------------------| |------------...
Here is the SQL script:
create table Employee(
Carnet nvarchar(15) primary key,
Name nvarchar(500),
LastName nvarchar(500)
)
create table Document(
ID nvarchar(20) primary key,
Employee nvarchar(15) foreign key references Employee(Carnet),
Project nvarchar(20) foreign key references Project(ID)
)
create table DocumentsArea(
DocumentID...
What difference between Super and Candidate key in ERDB?
Thanks.
...
I've got a settings table constructed with 'category' determining different products, 'varname' being the variable name, and 'info' being the value of the setting.
so, for instance,
select top 6 category, varname, info
from settings_table
where NODE_NAME='HTT-COMM-A'
and section='Module Settings'
and category in ('ProductA',...
I have an application in mind which dicates database tables be append-only; that is, I can only insert data into the database but never update or delete it. I would like to use LINQ to SQL to build this.
Since tables are append-only but I still need to be able to "delete" data, my thought is that each table Foo needs to have a correspo...
I am trying to create a database design and need some help. Diagram is displayed below. The database is for an address book attached to a e commerce site. Its coded in php and uses a mysql database.
See my diagram below - I think I have solved my problem but I want to know is this a good way to do it?
This is what I would like to do:
...
I'm sure there's an easy answer here and i'm just over-complicating things, but i am in the process of writing a Django module responsible for storing and tracking user usage statistics which can then be displayed to users on certain pages.
Simplest example of this might be tracking which products a user has purchased and looked at so t...
I was just wondering which field type would be the best solution for storing a timestamp in a MySQL database.
Currently I store timestamps in an INT (10) field and insert the time by doing UNIX_TIMESTAMP(). If I was to use a timestamp field would it be slower or quicker when indexed? I know both fields use 4 bytes.
...
Looking into requirements for the User Session table for a social site.
Currently I am designing it to store:
• UserID - links to user's who owns the session
• Session ID - unique to the user
• Session start – Time, Day, Date, Time zone
• Session end – Time, Day, Date, Time zone
• Session length
• MAC address
• Computer name
• IP addr...
I have the following tables:
======================= =======================
| galleries | | images |
|---------------------| |---------------------|
| PK | gallery_id |<--\ | PK | image_id |
| | name | \ | | title |
| | description ...
Hi, I want to have two different tables in MS SQL, for example users and groups, both with identity column. It is possible to create auto increment over two identity columns? I want to have third table with common informations to these two tables and I want to identify unique record.
In Oracle is SEQUENCE.
It is possible to do it?
Tha...
It is necessary to implement a logging, messages are planned to store in DB in a "log" table. Among other fields each message will have a "status" field: 0 - successful, 1 - wrong data, 2 - wrong user, 3 - whatever, 4 - etc...
The straightforward idea is to store the "Status" field as "int" column in the same table... To push data in ta...
Hi.
Ok, i'm shit at describing. Here's a relationship diag.
In Django i've made my models like:
from django.db import models
from datetime import datetime
class Survey(models.Model):
name = models.CharField(max_length=100)
pub_date = models.DateTimeField('date published',default=datetime.now)
def __unicode__(self):
...
How does Facebook structure their data for messages. I have heard they use Cassandra for inbox search, but is this the only technology they use?
...
I am working on the accounting portion of a reservation system (think limo company).
In the system there are multiple objects that can either be paid or submit a payment. I am tracking all of these "transactions" in three tables called: tx, tx_cc, and tx_ch.
tx generates a new tx_id (for transaction ID) and keeps the information about ...