The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
33 views

Grouping operator in DBMS (γ) is duplicate-impervious. Why?

I'm reading Database Systems by Ullman where its mentioned that γ is duplicate-impervious. I don't understand why a simple group operation should cause elimination of duplicates. Aliter, ...
10
votes
2answers
3k 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 ...
2
votes
1answer
75 views

Minimal 3NF normalization issues

I'm trying to learn how to normalize to 3NF but the example that my teacher gave us doesn't really help. The algorithm I always used is this one: Find a canonical cover F_c for F For each FD X->Y ...
13
votes
4answers
11k 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 ...
3
votes
1answer
27 views

Why are multivalued dependencies named that way?

I'm doing a relational design course on Stanford open courseware. I understand why functional dependencies are named that way - A->B means B is specified when A is specified, or in other words, the ...
1
vote
0answers
28 views

What is stable history in a database?

I am reading the paper Making geo-replication fast as possible, consistent when necessary by Li et al. in which they propose a geo-replication system called "RedBlue Consistency". They have a table ...
0
votes
1answer
21 views

Can there be situations where using (noexpand) on an indexed view is undesirable?

From the past experience using the schema bound and indexed view in a query with (noexpand) hint usually dramatically improves performance if the view is designed well. Apparently using the indexed ...
0
votes
1answer
40 views

Tuple calculus: unsure if my reasoning is correct

I'm currently working through a tuple calculus question and I ran into a situation where I have two answers that seem correct to me and I am unsure if my logic is wrong or if they are both correct ...
0
votes
0answers
50 views

Time complexity of query optimizer

I'm reading this article "How does a relational database work"(http://coding-geek.com/how-databases-work/) I'm confused by the section: Dynamic programming, greedy algorithm and heuristic. Using ...
7
votes
2answers
136 views

What are the practical uses for relational calculus?

In my Database Design course we are learning both Relational Algebra and Relational Calculus. I can see where Relational Algebra could be useful since it is closely tied to SQL. Our professor said ...
2
votes
2answers
295 views

Do Nested Transactions commit? [closed]

I am not happy with the Wikipedia article about nested transactions. I would not use the word "commit" for a nested transaction. For me "commit" means "durability". A nested transaction does not ...
0
votes
0answers
97 views

Method to economically insert Bill of Materials BOM items into a Stock Table?

I’m new to the wonderful world of database design and I’m currently experimenting with an implementation for my little brother relating to Model Train Sets. [I will be using SQL Server 2012 / Asp.Net ...
2
votes
2answers
52 views

Word for describing how normal (technical term) a database is

Database Normalization is the process of changing the structure of a formal database schema in order to minimize redundancy. Database theory describes some states of normalization in order to make ...
3
votes
4answers
821 views

Are junction tables a good practice?

Say I have a large table that holds the user's info and another table that holds several locations. Then I use another table that holds the user_id and the location_id. In order to retrieve the data ...
0
votes
0answers
30 views

Using logic or in relational algebra

In relational algebra I can obtain the courses taught in Fall 2009 or Spring 2010 with Π_{course_id} (σ_{semester=“Fall” Λ year=2009} (section)) ∪ Π_{course_id} (σ_{semester=“Spring” Λ year=2010} ...
0
votes
0answers
25 views

Canonical Cover for Functional Dependencies ho

I'm trying to decompose a relation into 3NF and I'm given the following information: Given R(A B C D E F G H I) Keys: {A,B} {A,D},{B,D} FDs: AB-> DE A->I B->CFGH G->H AD->BCEFGH ...
0
votes
1answer
34 views

Usage of non standardized queries

So this is more of a theory question than practical but I'd appreciate any help. My friend and I are doing a project to learn new stuff and have fun. He's a coder and I like to think that I'm good ...
2
votes
0answers
76 views

Tuple Relational Calculus help? [closed]

I have the following three questions in relation to the following diagram: 1) How many copies of the book titled “The Lost Tribe” are owned by the library branch whose name is "Sharpstown"? ...
5
votes
1answer
850 views

Transaction and data consistency during a failure

When a database begins a transaction, all statements executed in that transaction are isolated and atomic (and consistent and durable). These are pretty much the definition of a transaction. ...
1
vote
1answer
171 views

Normalization to 2NF and 3NF

I solved this example to determine 2NF and 3NF. I would like to check if my answer is correct. Can somebody check the 2NF and 3NF of this example, please? R( A B C D E F G H I J) with functional ...
1
vote
2answers
400 views

Why is a functional dependency described as a “one-to-many” relationship?

As far as I know, the definition of a functional dependency reads that, given the attributes X and Y, "each X value is associated with precisely one Y value". But then the author of the article that I ...
1
vote
2answers
54 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
130 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 ...
1
vote
1answer
88 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 < ...
0
votes
2answers
1k 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 ...
0
votes
1answer
43 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
37 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 ...
65
votes
5answers
29k views

When to use TINYINT over INT?

In general, I always use Ints. I know that in theory this is not the best practice, though, since you should use the smallest data type that will be guaranteed to store the data. For example, it's ...
4
votes
1answer
335 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
1answer
913 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 ...
1
vote
1answer
31 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
192 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 ...
3
votes
3answers
543 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
834 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 ...
6
votes
1answer
3k 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
140 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
0answers
168 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
53 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 ...
4
votes
1answer
260 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
432 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 ...
-4
votes
0answers
110 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
votes
2answers
496 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 ...
2
votes
1answer
272 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. ...
1
vote
0answers
50 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
541 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) ...
0
votes
3answers
122 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
101 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? ...
1
vote
1answer
57 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
233 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
694 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 ...