New answers tagged

-1

I am in the same exam as you, I have asked Paolo what is meant by this: Minimal key and candidate key determine all other attributes in a relationship. a primary key is a candidate key chosen as the smallest number of unique attributes. He states that a minimal key is the fewest number of attributes so he means a primary key when he says minimal


0

First of all, you say: (TFN → ID is redundant right?) This dependency is not redundant, since otherwise you do not know that TFN is a key, and you lose an essential information. So you must include it in the set of functional dependencies. For phone, if each phone is uniquely associated to a person, and each person can have only one phone, then you ...


0

I figured it out and got it confirmed by the lecture, hopefully this will help someone else: i) The key is {A,B,E}. This means that FD1 and FD3 are both partial — but note that FD2 is not, because {D,E} is not a partial key. The decomposition creates one table for each of the FDs, and one for the PK FD: R1(A,B,E) R2(A,B,C) R3(B,D) - ...


0

First, let's note that in this case there are three keys, not only one: AB BD BC This means that all the attributes are primes, so the relation is by definition already in Third Normal Form. For the BCNF, you have described the “analysis algorithm”, which is the algorithm presented in every good book on databases. But, with this example, you have also ...


2

It is better to create a separate table for agent_status. Now it seems easy to add agent_status column in agent table itself. But with my little experience I can tell you, business requirements may change in future, sometime too often. Our data model must be developed in a way it should accommodate all the future requirements and changes without much ...


0

Blockchain derived from Bitcoin is slow and expensive; the amount of data that can be stored in a block is very modest. The mechanisms behind blockchains (distribute ledgers) are intended to provide an incorruptible, highly replicated data store; peer to peer is less an essential feature than a "political requirement" to avoid the appearance of central ...


1

When looking to see if a relation is in 3NF, two are the questions that you must answer: Has every functional dependency a left hand side which is a superkey? If this is not true, are the attributes on the right hand side prime attributes? (i.e. belonging to any key?). So in your example you can see that both A -> B and A -> C are dependencies in ...


0

You can add an extra field in Location table to differentiate start and end locations: Trip(TripId, VehicleId, StartLocId, EndLocId) Location(LocId, LocAddress, LocType) The extra field LocType should be of type boolean which will have one of two values (0,1). You can use 0 for start location and 1 for end location.


1

The purpose of normalization is to remove insert, update and delete anomalies from the data model. For instance, if you have a spelling error for the name of a location or say the lat-long is incorrect, you would want a single place to go to change that information. Your solution with two tables seems correct to me. Each column is dependent on the key, ...


5

The last two lines are an abbreviated way of solving the problem without recurring to the complete algorithm to check for dependency preservation. In particular the teacher noted that combining the dependencies that you can obtain from R1 and R3 you cannot obtain C, which is essential to get A in the dependency BC → A. This dependency can never be derived ...


1

I'd better say F¹⁺=∅ F²⁺=∅ F³⁺={AD → E, B → D, AB → D,AB → E} F⁴⁺={E → G} and (F¹⁺ U F²⁺ U F³⁺ U F⁴⁺ ) != F


4

You are correct, the relation is in 2NF, 3NF, BCNF. The reason is that the relation has two keys, A and CD. So the relation is in BCNF (which is a property stronger than 3NF and 2NF) since each determinant of the minimal conver of R1 is a key. Here is one minimal cover: A → C A → D C D → B C D → A


6

Is blockchain a potentially viable database solution for modern, high transaction volume applications? The blockchain technology in general has some characteristics that make it difficult to work with high volumes. Take a look at Bitcoin for example. The average transactions per day have never been more than 300K: Transactions per day (source ...


11

I'm very familiar with cryptocurrency and databases, and I can tell you it's not a great DB engine at all. Using the blockchain as a live database: Think of it as a first normalized form without any really good built in search capability or indexing as far as the blockchain goes. Basically a excel sheet without any computation capabilities that just ...


2

The relation is actually in 3NF (so that it is also in 1NF and 2NF). The reason is that each attribute of the relation is prime, that is, it belongs to a (candidate) key (the are four keys in this relation: (A X), (A Z), (X Y), (Y Z)). The definition of the 2NF (which has only an historical interest), is the following (Database System Concepts, 6th edition, ...


1

You can create a table ProductPrice: CREATE TABLE ProductPrice ( ProductID int NOT NULL, ProductSetID int NOT NULL, StoreID int NOT NULL, Price numeric(10,2) NOT NULL, PRIMARY KEY (ProductID, ProductSetID, StoreID), FOREIGN KEY (ProductID, ProductSetID) REFERENCES ProductProductSet, FOREIGN KEY (StoreID, ProductSetID) REFERENCES Store ) ...



Top 50 recent answers are included