What are the different types of keys in RDBMS?

(I) Super Key – An attribute or a combination of attribute that is used to identify the records uniquely is known as Super Key. A table can have many Super Keys. E.g. of Super Key ID ID, Name ID, Address ID, Department_ID ID, Salary Name, Address Name, Address, Department_ID So on as any combination which … Read more

Overnormalization

In the general sense, I think that overnormalized is when you are doing so many JOINs to retrieve data that it is causing notable performance penalties and deadlocks on your database, even after you’ve tuned the heck out of your indexes. Obviously, for huge applications and sites like MySpace or eBay, de-normalization is a scaling … Read more

Can one make a relational database using MongoDB?

The idea behind MongoDB is to eliminate (or at least minimize) relational data. Have you considered just embedding the attendance data directly into each student record? This is actually the preferred design pattern for MongoDB and can result in much better performance and scalability. If you truly need highly relational and normalized data, you might … Read more

How do cursors work in Python’s DB-API?

ya, i know it’s months old 😛 DB-API’s cursor appears to be closely modeled after SQL cursors. AFA resource(rows) management is concerned, DB-API does not specify whether the client must retrieve all the rows or DECLARE an actual SQL cursor. As long as the fetchXXX interfaces do what they’re supposed to, DB-API is happy. AFA … Read more

Why aren’t OODBMS as widespread as RDBMS?

One reason that RDBMS has retained popularity is that it’s established technology, well understood and has a standard language (SQL) that multiple vendors support. It also has a few good interfaces like ODBC and JDBC that make it connect with different languages pretty well. A stable API is a strong factor in keeping a technology … Read more

How to solve “Batch update returned unexpected row count from update; actual row count: 0; expected: 1” problem?

The error means that the SQL INSERT statement is being executed, but the ROWCOUNT being returned by SQL Server after it runs is 0, not 1 as expected. There are several causes, from incorrect mappings, to UPDATE/INSERT triggers that have rowcount turned off. Your best beat is to profile the SQL statements and see what … Read more

Why don’t DBMS’s support ASSERTION

There are four levels of constraint: column-level, row-level, table-level and schema-level. A table-level could, for example, involve a target table other than the source table on which it was declared but only gets checked when the source table changes. In theory a schema-level constraint would be checked for every change in every table in the … Read more

Should I normalize my DB or not?

A philosophical answer: Sub-optimal (relational) databases are rife with insert, update, and delete anomalies. These all lead to inconsistent data, resulting in poor data quality. If you can’t trust the accuracy of your data, what good is it? Ask yourself this: Do you want the right answers slower or do you want the wrong answers … Read more

PostgreSQL IN operator with subquery poor performance

Seems that I have finally found a solution: select * from view1 where view1.id = ANY( (select array(select ext_id from aggregate_table order by somedata limit 10) )::integer[] ) order by view1.somedata; After elaborating @Dukeling’s idea: I suspect where id in (1,2,3,4,5,6,7,8,9,10) can be optimised and where id in (select …) can’t, the reason being that … Read more

techhipbettruvabetnorabahisbahis forumu