Tag Info

Hot answers tagged

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 ...


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 ...


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 ...


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, ...


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 ...


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, ...


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 ...


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 ...


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



Only top voted, non community-wiki answers of a minimum length are eligible