The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
27 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
38 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
37 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 ...
1
vote
2answers
1k 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
95 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 ...
1
vote
0answers
217 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
117 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 ...
1
vote
0answers
525 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 ...
0
votes
0answers
78 views

How to allow CodeFirst migrations to make schema changes against a replicated database

Running any migration that alters existing replicated tables fails with the following error: You can only specify the READPAST lock in the READ COMMITTED or REPEATABLE READ isolation levels. ...
1
vote
2answers
2k 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
133 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
39 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
393 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
1k 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
266 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; ...
3
votes
2answers
2k 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
883 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
263 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
141 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
708 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
306 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
372 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
414 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
424 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
276 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 ...
3
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
483 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
284 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
2k 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
507 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 ...
4
votes
2answers
1k 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
2k 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 ...