I need to import this file into the following table structure: CREATE TABLE [dbo].[tab_sorts]( [row] [int] IDENTITY(1,1) NOT NULL, [id] [int] NOT NULL, [date_sort] [nchar](10) NOT NULL, [date_day] [int] NOT NULL, [date_month] [int] NOT NULL, [date_ye
I have a requirement in my app where one user can send the friend request to another user. We use SQL Server database as the backend. The structure of the table is like this. CREATE TABLE FriendStatus (FriendStatusId BIGINT PRIMARY KEY IDENTITY(1,1),
To design my database, I have a big table that contains Devices specifications (table : "Devices"), there are about 60 columns. The value of several features will be in a predefined list (of 3 or 4 values). They said that we should not have big
I'm trying to construct a database that will do the following: "Allow a user to give or take a number of items from another user and leave an optional comment about it." I would think this only would need two tables: Users Table: UserID (PK) Fir
A Team Captain must be created by an Admin. once created, a Team Captain can then create the rest of his/her Team by adding members. Does it make more sense to have a separate Team Captain table or just to assign a Team Member Role (captain or member
I am a novice database admin and I am working on a project that would take a hardware inventory spreadsheet and migrate it to SQL server. Currently, the data exists as one large denormalized view. I am trying to achieve 3NF, but somehow I feel that I
I'm a newbie messing around at designing a database. I want to create a database(using mysql) that contains employee information. Then I will write Web Client to display each employee profile. I so far the columns would be: 1) user id 2) first name 3
Database schema I have this fields: title (string) subtitle description (string) Is better set the default value as an empty string '' or a NULL? For better reading/writing and size-storage performanceThe usual contract is: NULL means "no information
I am trying to figure out how I should go about building my database structure (tables) for user information on my website. The kinds of information that I will be storing (at this time anyways) are: About Me Birthday (January, 1, 1970) Sex (Male/Fem
Just a quick architecture question really on storing calendar data. Basically, I have a database of services for rental. On the front end, there is a calendar to show either "Available" or "Unavailable" for every future date. In the ba
Consider this situation: a Car is bought from a Salesperson. A Salesperson works at a Showroom (and at only one Showroom). A Showroom is affiliated to a Manufacturer, and only sells cars made by that Manufacturer. At the same time, a Car is of a part
I want to create a GridView that displays records for PDF Files. These records can have meta data attached that is customizeable by the user, so they can create their own columns and enter their own information in there. I then want it to be displaye
I have a MySQL table that represents a list of orders and a related child table that represents the shipments associated with each order (some orders have more than one shipment, but most have just one). Each shipment has a number of costs, for examp
I have a questionnaire for users to be matched by similar interests: 40 categories, each with 3 to 10 subcategories. Each of the subcategories has a 0 - 5 value related to how interested they are in that subcategory (0 being not even remotely interes
I am creating a new DB in MySQL for an application and wondered if anyone could provide some advice on the following set up. I'll try and simplify things as best as I can. This DB is designed to store alerts which are related to specific items create
I'm working on a project where the database has a few tables that contain a type_id field that stores id's from multiple tables for instance: id | table_type | table id ============================== 1 ADDRESS 1 2 ADDRESS 2 3 CITY 1 4 CITY 2 4 ADDRES
Is there a design pattern to consider when building a data model for a banking application that requires data changes to go through an authorization level? For example, if admin1 changes the telephone number for customer1, the change should not be ef
I use a table to store various classifications of all words in the dictionary. It looks like this: word category origin-language ------- --------- --------------- happy adjective English bonjour greeting French ... from a set of classifications, I am
What would be the best way to model 1 table with multiple 1 to many relatiionships. With the above schema if Report contains 1 row, Grant 2 rows and Donation 12. When I join the three together I end up with a Cartesian product and result set of 24. R
I have a table for user questions and each question has a "question_score" field. for this field, if i allow it to be a NULL then this may save some spaces or even maybe save some CPU times, will it? question_id (int) | quesion_name (varchar) |
Can you please give me an database design suggestion? I want to sell tickets for events but the problem is that the database can become bootleneck when many user what to buy simultaneously tickets for the same event. if I have an counter for tickets
I'm searching in a way to limit the queryset which I can get through a model. Suppose I have the following models (with dependencies): Company |- Section | |- Employee | |- Task | `- more models... |- Customer | |- Contract | |- Accounts | `- other g
How it is better to organise a large database of addresses? It is need to create mysql database of addresses. How it is better for organising? I have two variants: 1) cuontries id|name 1 |Russia cities id|name 1 |Moscow 2 |Saratov villages id|name st
Let's say you have a table Orders with a foreign key to a Customer Id. Now, suppose you want to add an Order without a Customer Id, (whether that should be possible is another question) you would have to make the foreign key NULL... Is that bad pract
I'm designing a DB and would like to know the best way to store this: I have an user table and let's say it can have 100 item slots, and I store an ID. Should I use JSON ({slot1:123232,slot20:123123123,slot82:23123}) or create 100+ fields (slot1, slo
I have a coding problem where I have to store a 'note' and the dates the note applies to. Think of: Note 1 Hi, today Mr Client rang arranging these appointments. 30/8/2009, 31/8/2009, 5/9/2009 Note 2 Business as usual. 30/8/2009 Note 3 Restaurant is
I need to code a small record-keeping application for a small business in Windows and I'm considering programming it from scratch using .NET. However, I think that it might be overkill for such a common kind of program. It is mostly a CRUD applicatio
If I have two tables - Logins and Users, as follows: Logins LoginIdNo UserIdNo HashedPassword Users UserIdNo LoginIdNo Username Each login "has a user" and each user "has a login" but which "belongs to" which? Is it simply a
I have a three tier system, SQL Server backend, hand written data access layer, and using stored procedures. I have a table called EventTable. Each row is an 'Event'. An Event has a primary key, and a start date. CREATE TABLE EventTable ( ID INT IDEN
I've been doing a lot of DB refactoring lately and synonyms have come in incredibly useful. When I originally put in the synonyms I was thinking they would be very temporary while I refactor. Now I am thinking there might be some good reasons to keep