Tag: database-design

Optional foreign keys – is that good solution?

I have DB with few permission tables in form: UserId, Object Id, lot of bit fields I’ve added users groups to my DB and I need to update permissions to work with users and users groups. I think about 2 approaches. Create copy of each permission table and have 2 tables for each object permission […]

data transfer -mysql and sql

I’m try to get data from mysql server to ms sql server.I have done this processes in localhost(Using ODBC connector). But now those server are hosting as an online data bases.Can anyone tell me the way of doing this? I think i can’t use odbc connectors for online server. Please help me to fix this […]

Design Database – Best Practice

I need to implement an SQL server db, that will contain information about products as follow: There will be the following properties: **ProductName ProductTitle ProductPrice CreatedDate CreatedBy** (now it get’s complicated) **Property1 (MIN value, MAX value) Property2 (MIN value, MAX value) Property3 (MIN value, MAX value) Property4 (MIN value, MAX value) Property5 (MIN value, MAX […]

How to split SQL Server Transaction Log

My database server has just ran out of disk space. The Transaction log is taking over 100GB space and I have only 30GB free space. Because of this some transactions are taking infinite amount of time to process resulting in 9002 error. I would like to ask is there a way I can split this […]

Best practice to design big entities

What would be the best practice to design a big entity like an Employee table that contains over 100 attributes? Should I keep them as a single table with 100 columns or should I split them and to 1..1 relations and then compose the Employee object in my code? Any opinions? Pros and cons of […]

Database Design Microsoft SQL Server

Was thinking of creating a small application in c# but would like to hear some feedback on approaching my project with this method. Basically I will have 2 tables in MSSQL These are just examples…. **TableType TableTypeID Type TableInfo InfoID TableTypeID Name Color Size TagNumber** So when a user wants to create a new table […]

Database – How to manage high quantity of data over time with different refresh rates ?

I need to design a Sql server database capable of logging different data on different time scale . Basicaly what i have to log is data from battery cells from lots of battery at anytime. here is a basic model of the database. datatypes on the images are not the one that i use. I […]

Database subtyping/supertyping

I have tables “Crop”, “Corn”, “Soybean”, and “Grain”. One entry in Crop corresponds to a single entry in one of the other tables. The problem here is that Crop should be one-to-one with only one of the other tables, but not more than one. The Crop table is needed because it combines a lot of […]

is it possible to have two foreign keys for a column

I am comfortable coding in T-SQL but new to db design. I have a table of departments with PK_Department a table of loinc codes/test info with PK_Loinc a (differently structured) table of non-loinc codes/test info with PK_nonLoinc. I want to set up a one-to-one relationship between (PK_Department) <–> (PK_Loinc OR PK_nonLoinc) Is there a way […]

Storing an array of type string inside a database

I’m building a table of procedures, and I need to figure out a way so a ‘logged in user’ only has access to that procedure. My initial thought is to store this information in a Certified column within the table like so ‘JohnD’, ‘JasonD’, ‘JaneD’. Then I could only show that procedure if the user […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.