New answers tagged schema
3
votes
How do I protected my sensitive data (financial) from website/CRM programmers?
Practically speaking, you're quite limited in what you can do - especially without significant expense, which is usually not tolerable to those seeking a solution.
An analogy I sometimes use, is that ...
0
votes
Storing small lists of FKs in array column and joining
You can try this approach (I am using MySQL 8).
user and user_list tables:
CREATE TABLE `user` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(10) DEFAULT NULL,
`list_id` int DEFAULT NULL,
...
1
vote
database design for tree structure with just one level
Building on Yano_of_queenscastles just to provide a sample:
INSERT INTO RootNode (Id, OtherField1, OtherField2)
VALUES
(1, 'Root 1 Data', 'More data for Root 1'),
(2, 'Root 2 Data', 'More data ...
3
votes
Accepted
database design for tree structure with just one level
Simplest solution is making the parent node into separate table with the same set of fields*. Then no nested references would be possible.
For example, you could have following entities (SQL-like ...
0
votes
How should I design my databas for online voting web app?
You question is:
should I keep all the record for all very election in the same tables or should I replicate required table for every new election.
This is a question about data security.
If you keep ...
2
votes
Accepted
Enforce unique constraint without denormalization
If a task can belong only to one service, the second data model is the correct one. To enforce your constraint, you have to add a redundant copy of environment to task:
add a new column environment ...
0
votes
How can I simplify the process of importing only changed data?
I'm considering joining all food tables into one big "foods" table (similar to the spreadsheet we use for importing) and adding a column to store a hash.
You don't need to do this in a ...
0
votes
How do I handle a single `reference` to multiple different types of data?
Here is an approach expanding upon your NoSQL (or document or JSON) data idea:
{
short: "abcd",
type: "url", // or image or text
// type specific data, e.g. for a url
url: ...
0
votes
Export pump all schemas except Sytem related schemas
Instead of excluding the system-related schemas on the export, and assuming your new instance only contains system-related schemas before the import, you could just exclude them on import:
impdp ...
0
votes
Query to compare the structure of two tables in MySQL
to only get the column names that exists in the first table and not the second:
select column_name from information_schema.columns where TABLE_SCHEMA='your_database_name' and TABLE_NAME='first_table' ...
Top 50 recent answers are included
Related Tags
schema × 1057database-design × 436
mysql × 228
postgresql × 194
sql-server × 175
oracle × 75
permissions × 63
normalization × 37
performance × 34
erd × 30
mongodb × 29
sql-server-2008 × 27
migration × 24
sql-server-2008-r2 × 23
table × 21
nosql × 21
foreign-key × 20
users × 20
relational-theory × 19
primary-key × 18
best-practices × 18
sql-server-2012 × 17
index × 17
security × 16
optimization × 15