Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I created 2 database designs (External & Internal Database). But I'm not sure if that fits in terms of relationship, normalization, logic, redundancy, ....
I also created 2 versions of the database design (The first one without mapping table and the second with). It's in German, I hope that's okay for you.
Do these designs meet typical relational database criteria such as 3NF, and do they specify the entity relationships in a clear and maintainable fashion?
database design 1
database design 2
Edit:
current database design
The ER diagram is OK of both internal and external because it is normalized, no redundancy, no many to many relationships and there is no functional dependency between fields except on the key.
I have a couple of comments about the diagram linked as "current database design":
The BM_Mapping table should use M-ID as its foreign key rather than Meeting_ID. The current design prevents any change to a value in the column Meeting.Meeting_ID.
I would keep the same primary-key naming convention in the Visitor table as used in the other tables. So V-ID rather than Visitor_ID
Apart from these comments, the rest of the design meets the standard RDBMS 3NF and entity relationship standards.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 days ago.
Improve this question
I am building an inventory management system with Cassandra and Django, and I'm trying to implement multi-tenant data modeling.
I have the following tables in my system:
Product
Product by ID
Required Item
Product Builds
Order
Complete Order
The above tables are for a single company. But now I need to support multiple companies in my system.
I'm trying to decide between two options:
Create separate tables for each company
Add a company ID column in every table to distinguish between data belonging to different companies.
I have searched for information on multi-tenant data modeling in Cassandra, but I couldn't find any concrete information that could help me make a decision.
Can anyone provide me with guidance on how to implement multi-tenant data modeling in Cassandra for my use case? What are the trade-offs and considerations of each approach, and what are the best practices for implementing multi-tenancy in Cassandra?
Any help would be greatly appreciated. Thank you!
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
Often we come across some small insignificant (debatable) tables left out as stand alone. Although they are used in joins (sparingly) but still developers don't bother to relate them.
May be too many References made the inserts slow.
This leads to this question :
As a thumb rule should we relate all the tables in the database ? If no then where to draw the line?
thanks
Foreign Keys are not always a negative impact to performance, they can be a positive impact as well. Database relationships do more than just ensure referential integrity, they also help teach SQL Server about the nature of your data. The fact that two fields are related can give clues as to the cardinality of your queries and thus the optimizer actually takes these relationships into consideration when it's estimating the cost of your query.
In my opinion, if two fields are related in your database, they should have a defined relationship. In general, the more you can teach SQL Server about your data (not just relationships, but CHECK constraints as well), the better it will be at generating efficient query plans. Of course like anything in SQL Server, there are exceptions to the rule, but if you want a rule of thumb, I would lean toward defining all the relationships.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
When relations between tables are created it becomes very difficult to edit tables, drop and re-create them. well I decide to leave creating relations for when the job is done and that time its not easy either and later some tables might need modifying again.
what is the best practice for creating foreign keys, and all other relations?
In big projects that I devide project to several small projects, well sometime in one of the smaller projects I see that I have to make a small change to previous small projects. and this ruins everything.
I always create relations when I create my initial database structure, and because it is normally (sometimes... once was...) designed properly, the relations don't tend to change.
What you may find eases any changes to the tables is to change one of the options
In Tools-Options, choose Designers - Table and Database Designers and clear the checkbox marked Prevent saving changes that require table re-creation
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have a database design issue and I'm not sure which of my alternatives I should go with.
I have a system that shows a politician's votes on every issue. Users can log in and "support" that politician on each issue. I'm not sure how the associations should work. Here is a picture of two alternatives:
http://i1068.photobucket.com/albums/u447/dmoss18/ScreenShot2012-05-03at111656AM.png
Option 1: A politician has many votes on many issues. A user supports each politician's vote.
Option 2: A user supports a politician on a certain issue (an association table with three foreign keys).
Is option 2 not feasible at all? Is it bad practice to associate three tables in one entity? Which option is considered best practice?
I would prefer option (1) because it shows that the user supports the particular vote. In option (2) it would seem to be possible (without additional constraints) for a user to support a certain politician on a certain issue when that polititian has never voted on it at all! (Of course if that is a desirable possibility then you must go for option (2)).
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I was at a .NET development group meeting a couple weeks ago and the speaker was extolling the virtues of NoSQL and how even relational data doesn't have to be stored relationally if you just index lots of data. So, my questions are: was he blowing smoke? How does one craft an index to be more efficient than the last? Does indexing just logically store the information in a table in a logical format i.e. alphabetically?
Well relational data is needed more for data integrity than indexing. Speed is not the only consideration when choosing a database. SQL Server and other enterpise databases can perform very well if they are designed by people who know what they are doing. Unforuntately most relational databases are designed by data amateurs and their performance reflects that.
NoSQL databases and relational database are used for different things. I would never consider putting a financial application in noSQL for instance because of the need for data integrity and internal controls to prevent fraud and ensure records are consistent and correct. However a website where data quality doesnt matter so much (think Google - who would notice if they failed to serve up every single website that mentions Bill Gates in a query) then yes it is a good choice.