The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
45 views

Multidimensional aggregates

Suppose one wanted to cache simple aggregate data over a table or grouped parts of a table, one could simply make a table with the aggregated results. If the original table is only appended to, it is ...
1
vote
1answer
126 views

What's the term that describes filtering query that makes use of indexes

I am looking for a technical term that describes the type of query in SQL that makes use of indexes. I completely forgot the name and can not look it up anymore (there's even a Wikipedia article about ...
0
votes
1answer
28 views

Database relationship refresher

All, After several years of programming applications, I'm looking to refresh my understanding of databases. What I knew to begin with was fairly basic, and honestly, it's disappeared over time. I ...
2
votes
1answer
30 views

Simultaneous money withdrawls from a distributed/replicated database

Lets say I have $10 in my bank account. The database is replicated in North America and Asia. At the exact same time I do a withdrawl of $10 in N. America and in Asia, meaning that my withdraw would ...
4
votes
1answer
320 views

When should I use a new table?

If a database is to hold a large amount of eg tickets for concerts, should I make a new table for each concert, then keep a table connecting venues with concerts? I would like each ticket ID for ...
0
votes
0answers
269 views

How to design Saas application's database architecture in mysql

I have to develop a Saas application using Yii php framework and mysql. For developing this we have decided to make separate database for each customer. For this I need a effective basic database ...
1
vote
1answer
25 views

TRC: Select an ID if it appears on all measurements

I have these two "tables": Station (station_id, city) // Stations details Rainfall (station_id, date, amount) // Rainfall measurements With Tuple Relational Calculus (TRC), I need to ...
3
votes
1answer
104 views

Boyce-Codd Normal Form

I am bit confused with BCNF and would appreciate any clarification. I have a table The primary key is a composite of all its attributes. Is this table in BCNF? My assumption it is not, because ...
0
votes
1answer
157 views

Get the value of one attribute from the reference key of another table?

I have two tables named as ps_order_detail and ps_product_lang in MySQL. I want to get the product name from one table whose reference key is in another table. I have two tables. First the ...
3
votes
3answers
239 views

Why does data get corrupted in “large” text files - Reasons to use database

I am just starting to learn about databases and using mysql. I read that databases are more reliable than having large ascii text files and that ascii text files are more prone to corruption as they ...
0
votes
2answers
394 views

Decomposition of a relation to 2NF and 3NF

I am trying to solve this example, but for now I can't. Can somebody show me, step by step how to decompose this to 2NF and then to 3NF? R = {ABCDEF, ABC -> EF, B -> E, E -> D} key of this ...
0
votes
0answers
60 views

Decomposition into BCNF where an attribute appears in multiple functional dependencies

I am trying to decompose my relation: R = (A, B, C, D, E) with Functional Dependencies F = {D -> BC, E -> B, A -> B, B -> D} The problem is that D appears in two dependencies and in ...
6
votes
1answer
1k views

Find the highest graded student, using Tuple Relational Calculus

Suppose I have a table of students, containing their ID and their grade: ----------------- | id | grade | ----------------- | 1 | 83 | | 2 | 94 | | 3 | 92 | | 4 | 78 | ...
0
votes
2answers
82 views

What does <> mean in Relational Calculus?

I saw a Tuple Relational Calculus formula, and it contained the symbol <> I couldn't find any reference to it anywhere - can anyone tell me what this means? (perhaps this question will be a ...
1
vote
1answer
50 views

Database design implementing support for different languages [closed]

Today I was practicing database design, for example I was trying to build a database design where I would like to store my favorite shows. I have normlaised this database to the third form (at least I ...
1
vote
0answers
71 views

How to merge rows based on how much data they have?

I am cleaning data and I formed a table something like this: file | product | color | product_id --------------------------------------------- one.csv pipe blue null ...
1
vote
1answer
80 views

Why add indexes to these columns in the Database?

I am trying to get my head around this code. It's from the Rails Tutorial Book and is part of the process of making a twitter like application. class CreateRelationships < ...
4
votes
1answer
147 views

Probable circular dependency, but query still runs

I built this ER diagram in MySQL Workbench and it will run and generate the database. My concern is that the relationship between the employees, departments, positions, and employment_statuses is a ...
7
votes
4answers
314 views

how to explain indexes

This question is about teaching: When I learned databases, we talked about indexes being like the card catalog in the town library. We had at least an author index, a title index, then the Dewey ...
-1
votes
2answers
245 views

Relationship between professor and course [closed]

I'm designing a database where I have a Course table and and Professor table. The business rules are : 1) A professor can teach many courses. (This is obvious). However, I get stuck in the second ...
1
vote
0answers
49 views

Where should a default setting field be?

I am creating a database to track occurrences of incidents on buses based on an existing system. Currently the drivers can set a default bus number, which is used to pre-populate the bus number on the ...
0
votes
1answer
238 views

Database with insert data every 2 minutes

I have a site to develop into PHP and mysql where I take, with a cron, every two minutes 10 xml from a server parse each and insert data into my database. Well this data are simple string (maximum 10) ...
-4
votes
0answers
80 views

Why is LRU is not suitable for joining 2 relations in DBMS [closed]

In DBMS, can someone please explain how the LRU (least recently used) buffer replacement policy acts when joining 2 relations in a database? I have read that LRU is not efficient when joining two ...
1
vote
1answer
100 views

Approach for a 2,000 table migration

What might be the best approach when converting or migrating a database containing over 2,000 tables? Where would you begin to tackle such an issue? Steps to take in the first weeks of designing? ...
0
votes
3answers
108 views

Column partially determining accepted values of another column, should be somehow normalized?

I have a table that describes a set of properties (yes it's metadata, in this case there's a valid reason to have it in the database); among other things I tell the type of the data that can be ...
1
vote
1answer
51 views

Adding users to a list and sort by category?

I'm using SQL-Server 2012 and I would like to know how to solve this program. So: I want to create a page that allows admins to manage a project, and part of it, would be to add members/employees to ...
0
votes
2answers
123 views

Multiple instances in Oracle

I'm really confuse with the term instance and database. So, my first question is how database and Instance are related in Oracle, I mean, whether an instance is associated with one/multiple ...
1
vote
0answers
244 views

Closure of attributes definition clarification

A databases book I am using states [1]: The closure of {A1, A2, ..., An} under the FD's in S is the set of attributes B such that every relation that satisfies all the FD's in set S also satisfies ...
-1
votes
1answer
214 views

How can I move 5 GB data from one database to another faster?

I'm using MySQL as database with Windows server. I'm having 5 GB of data in database. Now I need to change my server and the question is that how can I transfer complete 5 GB data to one mysql ...
0
votes
0answers
47 views

Examples of a database with no consistency measures that ensures consistency through schema alone

To clarify, the database can be any type RDBMS, NoSQL/BigTable. However, it must not employ any usual consistency measures such as locks, or synchronization, but the inconsistency-invincibility must ...
0
votes
0answers
99 views

In DBMS binary relationship is better than ternary

For which reasons (Features/points) binary relationship is better than ternary one in Database ER modeling? I got something by searching in website but those are not precise and meaningful!
1
vote
2answers
468 views

Reflexivity axiom for inferring functional dependencies

As you know there are three Armstrong's Axioms for inferring all the functional dependencies on a relational database. (X, Y and Z are set of attributes) Reflexivity: If X ⊆ Y, then Y → X ...
2
votes
1answer
186 views

Deriving formulas for input/output

I'm currently enrolled in a DBS class and am having problem with an assignment. I've searched around and have been unable to understand what it is I'm meant to be doing with this derivation formula. ...
0
votes
2answers
720 views

Keep total transaction in invoice application

I want to make an application called as Invoice Application with MySQL database. Now I have designed this database. Now I want to know is this database good for Invoice Application. I will use MySQL ...
1
vote
1answer
2k views

Planning simple CMS: How much relation?

I'm currently in the process of designing the database for a rather minimalistic Content Management System I'm working on alone. It should allow scalability while remaining speed, especially on boxes ...
-1
votes
2answers
191 views

Information sources for multiple hierachy trees in a single table

I need some quality sources - books, websites etc. - to educate myself about putting multiple hierarchy trees in a single table using SQL. I'm looking for some good theoretical and practical ...
0
votes
1answer
137 views

Database column vs row size

I have Column A and Column B in a single table. I need to add 1,000,000 records to this table. I have 2 options: Keep 2 columns and add 1,000,000 records Add more columns and flatten out the ...
3
votes
2answers
226 views

how is synchronization maintained between different write and read database

One of my friends was asked this question in interview. Given two different databases one on which only write is done and the other on which only read is done. How does one maintain synchronization ...
3
votes
5answers
2k views

Does 'Cities' deserve a separate table?

I have the following Customers table: customer_id - int company_name - nvarchar street - nvarchar city - nvarchar comments - nvarchar The app will only be used in part of one small country ...
3
votes
1answer
1k views

Under what conditions are polymorphic associations used? What are the alternatives?

As I understand it, polymorphic relationships among tables in a database allow one table to have one foreign key that references many tables. I have found that tags are a common application of this ...
3
votes
4answers
172 views

Complete list of possible database “objects”?

When I finished my degree in Programming and Database I remember there being a general list of database "objects" like this: data types (a list unto itself) fields records tables views (sort of like ...
8
votes
4answers
344 views

What is a database?

There was lot of discussion in this question: What database technologies do big search engines use? So much discussion that it made me confused. So... what is a database, anyway? Are only relational ...
3
votes
1answer
256 views

to what “scale” of applications does nosql support?

Recently i came across the Nosql database concept, though i learnt how to and why of it, i did not get a proper answer to the question , to what scale of project does it support? Will it support ...
2
votes
1answer
249 views

Postgres synchronized backup - what's with the archive?

I am setting up a Postgres 9.1 master and a hot standby-server. I read the documentation but I'm not quite sure yet what I should do with my WAL files. Every commit is done on both servers before ...
4
votes
2answers
1k views

Ready-to-Use Database models example

Where can I find ready-to-use database models ? I don't need a database with data in it, but only schemas (UML diagrams). Perhaps something like the data models at this link, but much more complex ...
1
vote
1answer
183 views

Is an anomaly free relation necessarily normalized?

A normalized relation can still suffer anomalies. Going the other way, which (if any) normal forms can be violated by a relation that's free from anomalies? If such exist, For each such normal form ...
0
votes
3answers
480 views

SQL Server : primary keys advice to my whitepaper needed

I've tired to explain to every new junior developer in our r&d team why he should use Primary Keys and how to do that. So I decided to write small whitepaper, which every new developer should ...
1
vote
1answer
162 views

Overlapping Transactions

Apolgies in advance if this has been discussed before, or is even fundamental enough for it to be outlined on, say, Wikipedia. I just felt that asking would be more efficient! Anyway, I want to ask ...
7
votes
3answers
4k views

Why are NULLs sorted first?

Why is it that when we have a NULL value in a column and we order by the value ascending, the NULLs are sorted first? select 1 as test union all select 2 union all select NULL union all select 3 ...
7
votes
1answer
617 views

Is DB Normalization done purely based on the primary key or is it done based on all the candidate keys?

I have come across two flavours of the normalization procedure while referring the internet and textbooks. viz. Type 1. Normal forms based only on the primary key. In this type, -> 2NF disallows ...