Tag Info

New answers tagged

2

First the evident errors: special_part_id in Whole shouldn't exist whole_id in Part should be a FK to Whole, not to user That way the relationships is that Whole is comprised of one or more parts. Now to clarify something: Conceptually you can model a one-to-many relationship that is mandatory both ways, but physically it's imposible to implement. You ...


2

I think that the SRP translates directly to the principles of orthogonal design and full normalization in relational databases. If you recollect that SRP states that there there should never be more than one reason for a class to change then the analogy becomes immediately apparent. However, whether the database should be split into multiple smaller ...


1

The SRP applies to the classes and methods you define. A database is not a user-defined entity, it is a piece of infrastructure that transcends individual requirements and responsibilities (in fact, it is better having to deal with only one database for a system than having to juggle multiple ones). Therefore, there is no point worrying about the fact that ...


4

Item level permissions will require both database modelling and application enforcement. Essentially, You'll want to create an "item security" table that relates the RowIDs and PermissionIDs to each other. The application will then have to determine if the current user has the right permissions to view the item that they requested. The database can also ...


-1

Two concepts from the DB design world apply here. They are "natural keys" and "surrogate keys". A natural key is that combination of columns, the values of which can be used to distinguish the row which contains them from all other rows in the table i.e. that combination of values is unique in the table. Importantly these columns appear "naturally" in the ...


5

First make it clear than Rhyme is also a FK You should do either of the following: Make RhymeId the PK and create an composite unique index with WordID and Rhyme so no combination of two words appears twice. Get rid of RhymeId and make a composite PK with WordID and Rhyme I preffer the second option because you need to keep only one index instead of ...


0

As usual, the answer is "it depends". There's lots of different ways you can do it, each solution will vary depending on your unique situation. I have found that windows tends to barf at any more than 1000 files per directory, so in the past I have created a folder per 1000 files. But you could split it by starting character (eg alphabetically)... or create ...


1

Based on the information you have provided, that seems like a new table (KeyValues table that has three columns: foreign key, key, value where the foreign key links this new table to the existing table. This will allow the following: An arbitrary number of key/value pairs can be stored, which can be indexed and searched and you can join on queries with ...


2

Firstly your question is against the sites guidelines as it is something which will lead to discussion. Still to answer your question, you can create a sqlite db and inside it a table with all this static values to be displayed in drop downs, put the sqlite db in assets folder, on app first launch copy it to applications default db location and read it from ...


3

Model is not normal OtherSpelling should be a separate entity named Spelling DialectApplicable should be a separate entity named Dialect TagReferentCount should be calculated CategoryReferentCount should calculated In WordTag, WordID and TagID should be separate FK besides being CPK In WordCategory, WordID and CategoryID should be separate FK besides being ...


3

is this database design fully normalised? There are many normal forms. This design is mostly 3NF, except for the three ReferenceCount columns. As such it accords with common practice in the software development industry. is it sound? Yes, given your comments to the other answer, I wouldn't be upset if one of my developers suggested this as a ...


3

The most obvious violation of normalization in your DB are the reference counting attributes - they introduce redundant information and could get "out of sync" with the real number of references. "OtherSpelling" might be a violation of normalization, or it might not, this depends indeed on the data you are going to store. I think it is debatable if, since ...


8

is it fully normalised? no. are there problems with it? possibly yes. Just one example: "otherspelling" as a field in the word table breaks both normalisation AND is a problem. What if a word has multiple alternative spellings? And oh, you shouldn't aim for complete normalisation. Complete normalisation is itself a potential problem, especially for ...


5

You can use a date field as a primary key, but you can't key on PART of a field. You'd have to make a separate field with just the date. This particular condition isn't something that would normally be enforced by building it into the primary key of a table anyway. Your "Employee can't work same shift on same date twice even in two locations" is a business ...


1

Firstly, whenever a user is involved, there is at least one additional state involved: what if the user does not interact or use your app on any given day? This is important, because it leads to a variety of cases, e.g. If a user clicks yes on a Saturday, logons on Sunday but doesn't click a yes or a no, what do you want to show to the user? If a user ...


0

Data Warehouses are not products, they are data bases with a specific architecture (logically or physically). If you read Gartner Magic Quadrant for Data Warehouse, it basically lists DBMS vendors. There are DBMS that's more suitable for data warehouse operation (e.g. aggregation) which are more commonly known as column oriented DBMS. This kind of database ...


0

It is true Data Warehouses typically pull data from many different sources/parts of the business. A Datamart typically pulls data from a lone source. There are applications that cater to specific industries that offer the ability to integrate and pull data from different resources into a common data structure. I still wouldn't call this a data warehouse ...


0

Your assumption that a data warehouse can be a "single, off the shelf product" doesn't seem to fit in the context of what a data warehouse can be or is. From the info provided here: http://en.wikipedia.org/wiki/Data_warehouse The first thing you need to define is what "type" of data warehouse you want to build. The more generic the situation, the more ...



Top 50 recent answers are included