The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
14 views

Entity Framework: Automatic migration failed on huge DB

I am using EF 6.1.1, and DB has three million records and migration has to change the precision of a coulumn of type decimal. And the migration timeout window set to max value, CommandTimeout = ...
-1
votes
2answers
67 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
51 views

Composite primary key in Multi-tenant sql server database

I'm building a multi-tenant app (Single database, single schema) using Asp Web Api, Entity Framework and Sql Server/Azure database. This app will be used by 1000-5000 customers. All the table will ...
0
votes
0answers
22 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
53 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
66 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
22 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
12 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
44 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 ...
3
votes
2answers
80 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
347 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 ...
1
vote
1answer
129 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
208 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
52 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 ...
2
votes
3answers
5k 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
190 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
472 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
148 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 ...
4
votes
0answers
1k 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
5k views

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

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
159 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
770 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 ...
0
votes
1answer
418 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
5k 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
1k 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
403 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 ...
4
votes
1answer
191 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
953 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
397 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
398 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
518 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
483 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
338 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
543 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
348 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 ...
4
votes
3answers
3k views

NULLs in a composite primary key - SQL Server

I'm trying to work out the best way of creating SQL Server primary keys, foreign keys and constraints to accurately represent my data model in LINQ / Entity Data Objects. Let's assume - for the ...
2
votes
1answer
576 views

Will Entity Framework and/or Linq-To-SQL queries show up as “Adhoc Queries” in SSMS' “Server Dashboard” Report?

Its pretty much all in the title. I have a SQL Server which is showing that 90%+ of CPU Usage and Logical IO Performed is due to "Adhoc Queries" The rest rest of the usage shows up under the actual DB ...
5
votes
2answers
2k views

Two relationships to same table

i have one transaction table, each transaction has 5-6 contacts involved. each contact has the same fields like name, address, cell, email etc. So the best thing I guess is to use the same contact ...
0
votes
1answer
3k views

SQL keyword difference between MySQL and Oracle 10g?

Good afternoon, Are there differences between Oracle 10g and MySQL with the CREATE, ALTER, DROP, REF, PRIMARY KEY, FOREGIN KEY and attribute variable type keywords? The reason I ask, is I'm planning ...
4
votes
4answers
2k views

How can I generate an Entity-Relationship diagram and SQL DDL from natural language text?

Good morning, Using LaTeX or another text-macro tool/library, how can I use natural language text to describe relationships, then generate an Entity-Relationship Diagram and generate SQL DDL to ...
5
votes
3answers
1k views

Is the ADO.NET Entity Framework known for generating poorly performing queries?

This question is inspired by the comment posted to the latest ServerFault blog post: Are you guys still using LINQ to SQL? I know I can use SQL Server Profiler and/or the ToTraceString method to ...
5
votes
3answers
4k views

Why does this Entity Framework query perform so bad in MySQL?

Let me give you a little setup. We have a InnoDB table on MySQL 5.1 with close to 20 million records, no foreign keys, and proper indexes for queries we do. We are using the latest 6.3.5 MySQL ...