The tag has no usage guidance.

learn more… | top users | synonyms

-1
votes
0answers
38 views

Database questions very short [closed]

Can a relation only be an entity? Is a table (DBMS) an entity? Is a non hierarchical model an entity? Does a non hierarchical model have a simple primary key? A non hierarchical model is never ...
0
votes
0answers
17 views

Entity Framework using filestream

Does Entity Framework support file I/O using Win32 / .net API's? From online it states that Entity Framework only supports filestream using T-SQL which again can bloat the buffer pool and cause ...
6
votes
2answers
78 views

SQL server Database statistics degrading after execution

I have been experiencing timeouts while querying my SQL Server DB in particular one table. I tried updating the statistics and it fixed the performance issues for a couple of days. I started digging ...
3
votes
0answers
24 views

Azure SQL DB migration from Visual Studio raises collation error

I want to run a migration in my Azure hosted database. The migration works perfect in several local machines. When I try targeting the Azure database it raises the following exception: Column X is ...
1
vote
0answers
59 views

Splitting very large working table

I read the good posts here and here, but my scenario is a bit different, I cannot consider that older data becomes read-only data because any record in my Transactions table can be subject to updates ...
-4
votes
1answer
138 views

Entity Framework C#: Get rows between two dates [closed]

I have an SQL server database with a column named "Time" of format "datetime". In C# Entity Framework, I want to get all rows whose date is after 8am of today: using (var db = new ...
1
vote
1answer
45 views

How to return the difference (columns) between two databases or tables

I have a database that has been updated, many columns have been added. Currently the only way of returning the differences between the two databases is by going through the database.cs class that is ...
0
votes
1answer
19 views

Foreign key not able to get one to many working

I want to have a one to many relation with player points but I need it in such a way that entity framework sees it as a collection so i can add to it. I mean that one player can have multiple points ...
0
votes
0answers
20 views

SQL architecture question. User entity in 2 tables

I use Symfony 2 framework and standardized bundles to operate entities. So I have somewhat stable User Entity, which is based on the bundle structure. It contains mainly service information like ...
0
votes
1answer
12 views

Entity or attribute if only one field beside key and attribute for other entity?

Let's say I have an entity person which has an attribute Email. But the person can have more than one Email address. So I have to put this attribute into a separate table. But what I do not ...
2
votes
1answer
93 views

Encryption/Decryption with StoredProcedure/View

I'm working on a project that uses EntityFramework for programmers to access the data. We've recently found need to add fields that were determined that need to be encrypted. This will be the first ...
1
vote
2answers
48 views

One table or duplicate table with same properties but different dependencies

Disclaimer: I'm new to database modeling so I apologize in advance if the question is unclear or causes any confusion. I am using .NET Entity Framework and have the following tables: An Order can ...
0
votes
1answer
69 views

Database structure for object with dynamic attributes

I am developing a proof of concept for a personalized email sending web application (like MailChimp, but with premade dynamic templates). The general structure is that I have my templates (different ...
4
votes
1answer
121 views

Why do async_network_io wait types occur?

Last week something strange happened on our database. All of a sudden, the application blocked for our users who were not able to save new entities etc. After looking at the Activity Monitor of the ...
-1
votes
2answers
156 views

SQL server avoid procedures parameter sniffing

I'm getting slow performances from this procedure CREATE PROCEDURE MyProcedure01 @date datetime2(7) AS BEGIN SELECT [Limit1].[C2] AS [C1], [Limit1].[mc_object] AS [mc_object], [Limit1].[C1] ...
0
votes
0answers
47 views

Multiple M-M relationships between tables

I am working on the design of a new database. In this database, we track equipment corrective actions (repair). We have three personnel fields in each Equipment Corrective Action record: initiated ...
0
votes
0answers
193 views

Are these One-to-Zero-or-One relationship correct?

I'm working with SQL Server 2012 and I have these three tables: CREATE TABLE [dbo].[CODES] ( [CODE] [nvarchar](20) NOT NULL, [ ... ] , CONSTRAINT [PK_CODES] PRIMARY KEY CLUSTERED ( ...
1
vote
2answers
71 views

Referencing a single table from all tables in the database

At current, I have around 130 tables in my database, anticipating a growth of circa 200 tables in total. Now I have several tables (well, most of them, actually) that contain properties like ...
0
votes
0answers
68 views

Is there a standard direction to read cardinality relationships in?

I'm reading some documentation, and before getting egg on my face for questioning it, I'd like to check the standard way of reading UML cardinality relationships. The docs I have look like the image ...
0
votes
0answers
21 views

Identification of other entities.

Given the following scenario, what three other entities (and their attributes) would be of importance to this model? SCENARIO: The transport authority in Jamaica has recently added train ...
2
votes
1answer
97 views

Can I grant multiple remote LocalService accounts access to a SQL Server database?

I am designing a multi-environment Windows-based software product that will extensively employ Windows services running as LocalService to perform data access operations. All of the data access ...
5
votes
2answers
102 views

New Index on table cause table to be locked really often

Here are my tables : CREATE TABLE [dbo].[Trackers] ( [IdTracker] INT IDENTITY (1, 1) NOT NULL, [IMEI] NVARCHAR (16) NULL, [CreationDate] ...
3
votes
1answer
1k views

Database design for an exam system

I am working on creating a simple exam system, in which you are going to be basically able to store students, classes, exams, questions and scores(and some other stuff that those depend on). I am also ...
2
votes
1answer
169 views

one table for all blob with a one to one table for metadata which link to one or many tables?

I'm going to start by saying that I'm not a DBA but i got that role in my current project so I'm doing my best. The application must be able to store files(attachments, official documents, etc) The ...
0
votes
1answer
340 views

self referencing tables with SQL and entity framework

I have many tables in a database and the tables are nearly identical. There are limitations currently on what objects reference other objects. For example I have company,contact and project. Contact ...
0
votes
2answers
66 views

Can I update only the needed changes in a database?

First of all, I apologize if you can't understand very well what I am saying and it can be edit for better understanding of my post. The next example is for better understanding of databases with ...
3
votes
3answers
9k views

Trying to connect to PostgreSQL with Entity Framework via Npgsql and C#

So, I'm new to databases and only have done a little with PostgreSQL before. I have C# (visual studio 2012) and have downloaded the Entity framework (6). I have also downloaded the latest Npgsql data ...
0
votes
1answer
294 views

Inheritance discriminator column better int or varchar or enum?

What is the best practice for storing a discriminator column ? Does it make any difference ? Any pros/cons of using one over the other ? I am using MySql with Entity Framework but the question goes ...
2
votes
0answers
595 views

Rolling Back Stored Procedures in Entity Framework

I currently working a on project that operates within a transaction in entity framework. Before now all of the changes were made using a DataContext. I need to add a call to a stored procedure using ...
3
votes
1answer
170 views

Is this a step in the right direction for normalization? SQL 'inheritance' and Many-to-Many relationships

Context: So, this is kind of a compound question, but they go together, and definitely wouldn't make sense split up into separate questions. I've been working on a new database for what will end up ...
5
votes
1answer
2k views

How to troubleshoot “client driver has sent multiple requests while the session is in single-user mode”

I'm working with a developer who is struggling to stop the following error: The server will drop the connection, because the client driver has sent multiple requests while the session is in ...
1
vote
3answers
7k views

What could cause an auto increment primary key to skip numbers? [duplicate]

I have a table created with the following T-SQL: CREATE TABLE [dbo].[TableName]( [id] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY CLUSTERED ( [id] ASC )WITH (PAD_INDEX = OFF, ...
0
votes
0answers
200 views

SQL Server and Entity Framework

We are currently experiencing a problem with Entity Framework which generates a sp_executesql statement. This statement is below. The statement runs fine in SQL Server however through the front end ...
0
votes
1answer
44 views

Help with designing a multi relational schema / domain model

I am in the process of developing a web application with asp.net MVC. I am using Entity Framework to make a connection to my database. I am having trouble with a specific concept in my program. I ...
4
votes
2answers
1k views

Why can't I view the SQL Server database created by a web application?

I have an ASP.NET MVC web application deployed to IIS on a Windows Server 2012 machine. When the application first starts, it will create the database and tables it needs if necessary through Entity ...
2
votes
0answers
2k views

SQL Server intermittent error 40 Could not open a connection to SQL Server or The network path was not found

I am getting intermittent errors as per the below stack trace. I am using C# Entity Framework with SQL Server 2012 enterprise running on a separate server computer. I can connect and query the DB ...
1
vote
1answer
529 views

SSIS Package Execution From Visual Studio Unit Test

Hello I am attempting to run a test which contains the following code: string pkgLocation; Package pkg; Application app; DTSExecResult pkgResults; ...
6
votes
3answers
10k views

EF Code First uses nvarchar(max) for all strings. Will this hurt query performance?

I have some databases created using Entity Framework Code First; the apps are working and in general I'm pretty happy with what Code First lets me do. I am a programmer first, and a DBA second, by ...
1
vote
2answers
2k views

Reducing size of image returned by view

We are storing a list of images in a table in an image column. These are stored as their raw image size so they can be viewed in their details at full resolution. The problem I have is I want to show ...
1
vote
2answers
536 views

Replicating schema changes between production and development databases [duplicate]

Not too sure if this would be a good and proper way to go about things, so I apologize if I'm kind of far off. Currently running Microsoft SQL Server 2005, and in this we have a database for a ...
5
votes
1answer
276 views

Clear schema from database without dropping it

I'm working on a school project where I have a SQL Server with a database for my team. I already imported a local database created with Entity Framework. Now the model has changed, table properties ...
1
vote
2answers
1k views

Microsoft SQL Server how can i detach localdb to run on any computer

I am working on a personal project and have implemented a database system using the Entity Framework code first tutorial on msdn, link below, http://msdn.microsoft.com/en-gb/data/jj193542 I am ...
1
vote
0answers
493 views

Can someone please give me hints on normalizing this database and any other helpful hints

I am using Entity Framework 5 to work with this database but I am getting issues with how tblTalkers and tblChatSessions are being mapped in the entity model when imported into Visual Studio. Please ...
6
votes
4answers
423 views

How to troubleshoot orm queries interfering with other applications

Well, it's hypothetical scenario but what I'm trying to understand is the path to go from a post-morten log (say, an SQL Server Profiler trace) to identify the code on a ORM situation. To make it not ...
1
vote
2answers
628 views

With MS SQL Server are the generated constraint names predictable?

When you create your primary key, and foreign key constraints in a CREATE TABLE script, there are named constraints that are created, such as FK__RecentlyVi__ScId__2764765D ... are these constraints ...
3
votes
1answer
554 views

Curious Database building Problem (ER Diagram)

I am trying to build an EER Model for a Autostore that has 5 locations and offers a range of auto products. They offer car repairs and roadworthy tests as a service also. I need to be able to make ...
2
votes
1answer
390 views

Schema for 1 <-> 0..1(+), many related but only one primary

Using tools available in SQL Server 2008 and Entity Framework, what is a solid way to represent a one-to-many relationship, where there is an underlying unique relation that I need to enforce? My ...
4
votes
3answers
1k views

What should I consider when deciding between passing a comma-delimited string to a stored procedure instead of calling it individually per record?

I have to run the same stored procedure for a lot of records (hundreds or thousands, depending on user selection). The procedure is fairly basic: insert a record in two separate tables with some ...
1
vote
3answers
593 views

single select vs multiple selects using limit and offset

Working on a fairly high volume site. There are some tables example - the customers table which gets hit a lot. The problem We are writing a piece of code that selects a bunch of customers and ...
2
votes
1answer
405 views

Referring to super parent or as a separate entity?

I have this person table as super parent, id firstname lastname email telephone ... ... and user table as a child id person_id (FK) password username screenname ... ... They must be 1:1 ...