Tag Info

New answers tagged

0

Your question isn't very detailed, anyway here's how you could implement what you want: The simplest way to model a privacy setting schema is probably to add a visibility field to each relevant property of the user profile: User ------------------ id (int, PK) username (varchar, IDX unique) fullname (varchar) fullname_vis (int) email (varchar) email_vis ...


1

Maybe, you should use staff, attendance_staff, and school. staff table ========== id, fullname, birthday ... school Table ============== id, name, founded, number_of_staff ... attendance_staff table ======================= id, staff_id, school_id, attended_date, ...


3

Which of the two options is the best? The relational design is clearly superior to the hierarchical design used in the NoSQL example. A database schema designed using relational principles does not favor one access path over another. Each table represents a real world entity type and through the use of relational algebra queries of arbitrary ...


0

I would have 2 columns: one for the description and one for the keyword. I would probably use MyIsam (depending on which Mysql version you're using) and use Mysql FullText search features. Innodb supports it now. I would test with both and see which ones is most performant.


1

I would favor your first arrangement where you have an Item_Id FK in the Coupon table. You will be able to enforce the "One coupon per item rule" through a unique constraint on the Item_Id column in your Coupon table. You will be able to easily allow multiple coupons per item if business decides to change their mind. Like you said you can easily select ...


5

You are on the right track here. Somethings to consider: Users Likely a User can have multiple resumes. Job candidates often tailor a resume to a job opening and want to keep all of those. This means you will need a User table. Having a user table also gives you a place to store attributes of the user such as their name. Sections A resume has lots ...


0

Would this work? select owner,table_name from dba_tab_privs where privilege = 'SELECT' and grantee = UPPER('&SCHEMA');


1

We recently migrated Oracle 10g/11G databases to AWS and some databases we migrated to MySQL. We used Attunity Replicate for the Oracle->MySQL, which let us keep the AWS database in sync with the Oracle database until cutover. The issues you will hit as other replies indicate are stored procedures and functions, some data type issues, issues with Oracle ...


1

The ".frm" file holds table definition. You might want to check mysql file-types info. Usually when you move data-base physically do following: Shutdown mysql Copy datafiles to datadir make sure mysql has full permissions on it: chown mysql:mysql datadir/ -R start mysql So, make sure that the tables which are not "visible" have proper permissions for ...


5

The documentation on psql explains: Whenever the pattern parameter is omitted completely, the \d commands display all objects that are visible in the current schema search path — this is equivalent to using * as the pattern. (An object is said to be visible if its containing schema is in the search path and no object of the same kind and name ...


1

First command works because all listed tables has 'reference' in their schema. Second command works the same for 'donor'. so the relation "reference.iso_3166_1" does not have any 'donor' in its name. if you want to list iso_3166_1 then just try \dt+ iso* ref: http://www.postgresql.org/docs/current/static/app-psql.html#APP-PSQL-PATTERNS


2

Owned by more than one user: no Accessible by more than one user: yes To give a user (or role) access to the tables in a schema you can use something like this: grant all on schema foobar to role_name; grant all on all tables in schema foobar to role_name; grant all on all sequences in schema foobar to role_name; grant all on all functions in schema foobar ...


3

If you are looking for significant performance improvements to dnoeth's answer, consider using a native C-function and creating the appropriate operator. Here is an example for int4 arrays. (A generic array variant and the corresponding SQL script). Datum _int_sequence_contained(PG_FUNCTION_ARGS) { return DirectFunctionCall2(_int_contains_sequence, ...


0

The following DDL trigger is from the latest free Redgate tool, DLM Dashboard. This tool has an accompanying dashboard in which all historical schema changes are logged and can be configured to send emails on schema changes. We're looking for ways to improve it, so please let us know what you think! CREATE TRIGGER [RG_SQLLighthouse_DDLTrigger] ON ALL ...



Top 50 recent answers are included